Implements a text input widget for the Search Filter component.

Text Widget

Basic usage

{
    "search": {
        "categories": [
            {
                "id": "queryName",
                "name": "Name",
                "enabled": true,
                "expanded": true,
                "component": {
                    "selector": "text",
                    "settings": {
                        "searchPrefix": "",
                        "searchSuffix": "",
                        "pattern": "cm:name:'(.*?)'",
                        "field": "cm:name",
                        "placeholder": "Enter the name",
                        "allowUpdateOnChange": true
                    }
                }
            }
        ]
    }
}

Settings

NameTypeDescription
fieldstringField to apply the query fragment to. Required value
patternstringRegular expression pattern to restrict the format of the input text
placeholderstringText displayed in the widget when the input string is empty
searchSuffixstringText to append always in the search of a string
searchPrefixstringText to prepend always in the search of a string
allowUpdateOnChangebooleanEnable/Disable the update fire event when text has been changed. By default is true.
hideDefaultActionbooleanShow/hide the widget actions. By default is false.

Details

This component lets the user add a text value to search for in the specified field. See the Search filter component for full details of how to use widgets in a search query.

See also

© 2023 Alfresco Software, Inc. All Rights Reserved.