Skip to content

soqlDatatable: Column Sorting and Search

James Hou edited this page Feb 22, 2021 · 3 revisions

Sorting

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

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.

Search Considerations

  1. Because it's possible to return only a few rows for interactivity - you may want to enable the Allow Overflow (EXPERIMENTAL) flag so that row actions / inline-edit can overflow below each table.
Clone this wiki locally