0

Is it possible to tweak list view search box (Modern) and add additional filter using SPFx?

4
  • What exactly you want to do by tweaking the list view search box? You want to set default text in search textbox? – Ganesh Sanap Jun 9 at 4:51
  • No.. I have a very big list.. more than 200k items.. what I just need is only the items match with some content type.. currently I am typing in my searchtext AND contenttype:"<content type name>". I wanted to avoid adding AND filter manually. – san Jun 9 at 12:22
  • You can change the list view settings & add filter on content type. Check my answer below (1st workaround). – Ganesh Sanap Jun 9 at 12:26
  • its a big list.. encountered threshold limit issue. – san Jun 9 at 12:37
0

There are no supported ways to tweak default list view search box using SPFx.

Workarounds:

If you want a permanent filter on list view, you can apply it from View settings.

enter image description here

Documentation: Use filtering to modify a SharePoint view


If you want a temporary filter/search via textbox, you can do this using query parameter in URL like:

https://tenant.sharepoint.com/sites/siteName/Lists/TestList/AllItems.aspx?view=7&q=Bold

enter image description here

Note: It will open a SharePoint list in search mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.