-
Notifications
You must be signed in to change notification settings - Fork 93
soqlDatatable: Column Sorting and Search
Add a list of Field API names to the sortableFields
property to enable this feature. Parent notation (one level up) is supported.
Optionally, set default Sort Field
and Sort Direction
to have the asc/desc indicator automatically show when the table is initialized.
Multi-sort and filtering will not be supported.
Search can be enabled with the showSearch
set true. By default, it is false.
This search uses fuse.js object array search with a decreased fuzziness for more exact terms. This reduces the false positive hit rate (since it searches values across every column/row).
I have not tested against every data type possible (fuse.js may fail), so please submit an issue with exact repro steps if you find any errors. The good news is this is a backward compatible feature, so just leave showSearch
to false.
- If you plan on using global search with inline edit for picklist/lookup, please enable the
Allow Overflow (EXPERIMENTAL)
.- Because search results can return only a few rows, the dropdown for both picklist/lookup will get cut off.
- The downside of this experimental feature (to allow dropdown overflow) is it removes the ability for vertical/horizontal scrolling.
- When inline edit saves, global search is undone (search parameters cleared).
- Post MVP for global search, I may take a look at "holding" the search value and applying it to the table during a refresh from server.