SAP / fundamental-ngx

Fundamental Library for Angular is SAP Design System Angular component library
https://sap.github.io/fundamental-ngx
Apache License 2.0
267 stars 127 forks source link

[UX QUESTION] search with spaces around doesn't work in fd-multi-input component #12635

Open egorwow70 opened 5 days ago

egorwow70 commented 5 days ago

Is this a bug, enhancement, or feature request?

Hello, guys.

I have a UX question. Does a search with spaces around work in fd-multi-input component?

Because in Observable async example - https://sap.github.io/fundamental-ngx/#/core/multi-input#observable-async I see that you used .trim() before sending request image

But it seems the control itself won't return a suggestion with spaces around

So "Apple" works

image

But " Apple" doesn't image

Describe your proposal.

I am not a UX expert, but does it make sense to even return suggestions if a search value is with spaces around (because a user by mistake can add them, but idk)

Can you handle that on the application side

No

Which versions of Angular and Fundamental Library for Angular are affected? Please, specify the exact version. (If this is a feature request, use current version.)

droshev commented 2 days ago

@khotcholava Can you check and add support for text with empty characters matching?

egorwow70 commented 2 days ago

@droshev @khotcholava

Also question guys, if we display objects in fd-multi-input component, is it possible to search by different object fields? Because now it seems we can search only by the value, that is displayed for each object entity inside the dropdown.

But in our app we implemented a user search with fd-multi-input and we had a request to search by fullname, id, email. I didn't find the way to search by multiple fields, but I used a temporal hack - I display fullname and id together - valueFn = (user) => ${user.fullname} (${user.id}), but in this case we cannot add email to the string, because it becomes too huge

droshev commented 2 days ago

uest to search by fullname, id, email. I didn't find the way to search by multiple fields, but I used a temporal hack - I display fullname and id together - valu

did you check the current API ?

egorwow70 commented 2 days ago

uest to search by fullname, id, email. I didn't find the way to search by multiple fields, but I used a temporal hack - I display fullname and id together - valu

did you check the current API ?

Sorry, deno, my bad, I found it image

Also there is a documentation - https://sap.github.io/fundamental-ngx/#/core/multi-input#custom-filter