FAQ | This is a LIVE service | Changelog

Skip to content

Filter columns to add using autocomplete

With a large list of items available to add it can be difficult to find the items of interest. This change makes the select dialog into an autocomplete input which filters its contents as the user types. This adds the ability to use primary text or a given value as autocomplete value.

The MUI autocomplete component needs strings to enable autocomplete, which causes an issue if the primary text provided for a column is a react node instead. The new autocompleteOptionValue property will be used if provided for both the display of the item and the autocomplete. If not provided the primary text will be used (if it's a string) and otherwise the column key will be used.

Any components providing react nodes as column primary text will probably need to be updated to provide a string value instead to prevent showing the usually-not-human-friendly column keys.

Notes for reviewer

To review this you should install the related branch of the SMI application to see it used in context.

Addresses https://gitlab.developers.cam.ac.uk/uis/devops/digital-admissions/legacy-smi/-/issues/232

Edited by Richard Clark

Merge request reports

Loading