pnp / pnp/sp-dev-fx-controls-react
ListView Control - have hidden column so it is searchable but not visible
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 433
- Forks
- 418
- Avg merge
- 5d 6m
- Merged PRs (30d)
- 19
Description
@estruyf ,
Category
[ x ] Enhancement
[ ] Bug
[ x ] Question
Version
"@pnp/spfx-controls-react": "1.16.0"
Expected / Desired Behavior / Question
I have fields that I want to be searchable but maybe not visible (in the case of smaller screen size).
It would be great to have a boolean property that I can pass in the IViewField to make it hidden but searchable.
Maybe there is with the render property but I have no clue how to do that.
Thanks!
Observed Behavior
I tried setting these properties to something that would give the effect
minWidth=0, maxWidth=0, sorting=false, isResizable=false, displayName=""
But when I do, I see both a full size version of the column as well as a small version on the far right.
Also, when I remove the displayName, it wants to put the name in it's place. Maybe that is by design though.
Steps to Reproduce
export const timeSpan : IViewField = {
name: "listTimeSpan",
displayName: "",
//linkPropertyName: "c",
isResizable: false,
sorting: false,
minWidth: 0,
maxWidth: 0
}
With normal visible settings

With settings I listed above

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the ListView control and the IViewField definition referenced in the issue, then trace how field visibility and search are handled. Confirm the expected behavior against the supplied timeSpan example: the field should remain searchable without rendering a visible column, while ordinary fields continue to display normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100