pnp / pnp/sp-dev-fx-controls-react

ListView Control - have hidden column so it is searchable but not visible

Open
#448 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs: Discussion 🙋 type:enhancement
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

image

With settings I listed above

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.