Skip to Content
avatar image
Former Member

Searchfield behaviour

Hello, Is it possible to make the searchfield as advanced as the column filter? https://sapui5.hana.ondemand.com/sdk/test-resources/sap/ui/commons/demokit/SearchField.html The searchfield only search's/filter if i type in "a" i only get items that begin with "a" back, I can't do wildcards etc like I can in the standard filter on columns etc! Any ideas? Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 13, 2015 at 02:50 PM

    With enough time, effort, coffee, and code, anything is possible 🤪

    I created a JS Bin sample which splits the Search Field query by asterisk into an array of strings, creates an array of filters for each string, then filters the model with the array of filters.

    Like Robin said, you can do whatever you want with the passed query parameter in the SearchField's search event.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 12, 2015 at 11:37 AM

    I don't quite understand... in the SearchField's search event, you can do whatever you want with the passed query parameter, such as check for wildcards in order to construct a filter

    Add comment
    10|10000 characters needed characters exceeded