Global Filters
The globalFilters
property is used to show, hide and configure global filters on the List Screen. Currently, Workspaces supports three global filters: GroupName
, FormName
and DateCreated
.
note
globalFilters
is not mandatory, but if not set, all queries will have a dateCreated
range of one year from the current date.
Options
Date Created
The DateCreated
filter is used to show or hide the Date Created
input that allows Workspaces
to filter Txns by date created ranges.
Form Name
The FormName
filter is used to show or hide the Form Name
select component that allows Workspaces
users to filter Txns by form names.
FormName
relies on globalActions.FormName.options
in order to display the form list.
Example
The following example showcases how to configure a label, options and a value for different global filters.
import { ConfigCurrentSpace } from '@transact-open-ux/workspaces/dist/types';
export const processConfig = ({ date }: any): ConfigCurrentSpace => ({
...
globalFilters: {
GroupName: {
label: 'Queues',
options: ['Error Review', 'Fraud Review', 'Manual Review'],
value: 'All',
},
DateCreated: {
label: 'Created Date',
value: [date('4 weeks ago'), date('now')],
},
},
...
});
export default processConfig;
Attributes
To review the list of supported attributes, see API Reference.