Skip to main content

Version: 22.10

Search

caution

The structure of the search configuration has changed in this release. This is a breaking change.

To learn more, see Migrate from Workspaces 22.04 to Workspaces 22.10 > Search configuration.

The search component consists of a dropdown and an input text field.

If the dropdown is not visible or the value is set to any, the API query will be based on the search term provided with no additional parameters. If a value is selected in the dropdown, the keyword search will be carried out based only on the record matching the parameter.

tip

Searching without any parameters can lead to a long response time from the API if there are a large number of records. Using the search parameters can help mitigate this.

Configuration

The search property takes an array of searchable mappings. If the search property is not added to the configuration, the dropdown does not appear. Refer to Using Txn Attributes for more information.

Only mappings that are specified as columns in the table can be used for searching. If a mapping is specfied for the search config that isn't matched with the config for the table mappings, it won't appear in the search dropdown.

note

The input value needs to be an exact match in order to return the correct results.

Example

src/configs/custom/process.ts
import { ConfigCurrentSpace } from '@transact-open-ux/workspaces/dist/types';

export const processConfig = ({ date, currentUser }: any): ConfigCurrentSpace => ({
...
search: {
label: 'Columns',
properties: ['$primaryName', '$appId', '$currentQueue', '$appAge', '$assigned'],
},
...
});

export default processConfig;

Attributes

For a list of supported attributes, see API Reference > CurrentSpaceSearch.