Open wernerdaehn opened 1 year ago
What is the expected result?
- When the suggestion items aggregation contains the text "MYITEM" and the entered text in the input is "ITEM" it should show "MYITEM"
What happens instead?
- No suggestion items are shown in above case. Only when the entered text is "MYI" the suggestions are shown
In this "Input - Suggestions - Custom" sample, when entering "asic", the corresponding suggestion items are shown.
The custom filter function in that sample is also oItem.getText().match(new RegExp(sTerm, "i"))
.
Could you share a link to a minimal sample where no suggestion items are shown? Or did I miss something?
My guess was, as stated above, it is the aggregation binding that makes the difference.
I do not have an example at hand, my setup requires a lot of things. But take your sample and put it inside a sap.m.Table, so that you have as many rows as in a json model.
Your first problem will be how to add the custom filter via an XML View. And then my statement is, that the behavior of the control in the rows will not be the same as in the original sample.
I guess we have two separate issues here then:
sap.m.Input
missing a "filterFunction
" as one of the control's properties
with the type: "function"
which would allow app developers to assign their function also declaratively in XML.Is that correct?
Yes, that is my verdict as well.
Thank you for sharing this finding. I've created the following internal incidents:
The status of the issue will be updated here in GitHub.
Hello @wernerdaehn ,
The highlighting is working by design as mentioned in the guidelines for all inputs As a visual hint for the user, the matched characters are highlighted in the option list items. The highlighting works on the basis of “starts with per term”, regardless of the filtering method.
Anyway, I have asked the design team to add this to the input guideline as well.
Furthermore, we are working on another improvement of the Inputs to provide an API for a custom highlight function (similar to filter function but for highlighting).
Hope that helps.
Best Regards, Martin
OpenUI5 version: 1.108.6
Browser/version (+device/version): Windows, Chrome, latest
Steps to reproduce the problem:
What is the expected result?
What happens instead?
Any other information? (attach screenshot if possible)
suggest
event. Not nice.Note: As it is not so easy to set the FilterFunction, hence I am using custom controls, e.g.
and in the projection control