-
Notifications
You must be signed in to change notification settings - Fork 279
Description
Bug Description
Whenever filter items are selected inside ViewSettingsDialog and OK button is pressed an event is fired in which we see that there is key object pair ,
where key is -> text provided for filter item
object is -> an array of all the filter item options selected
We have give text as "Position" to the filter item ->

and as you can see it appears in the view settings dialog

Now when we select, any of the filter item options :

and console log the event details :


So basically in our code if we want to pickup the filters we do it by :
event.detail.filters[0]["Position"] ,
which seems fine if we just work with english , but in our project we support multiple languages, so when we change the language from english to french , then position gets translated to something else and then when pressed OK the event fired contain that translated text as key.
So, event.detail.filters[0]["Position"] this would not work anymore if we try to pick filters from the event, because now the text is translated .
Code Sandbox Link : https://codesandbox.io/s/ui5-webcomponents-forked-jxn5xt?file=/src/index.js
Affected Component
No response
Expected Behaviour
it'd be btter if the even generated would look for 'id' or 'key' as a first option rather than 'text'.
Isolated Example
No response
Steps to Reproduce
...
Log Output, Stack Trace or Screenshots
No response
Priority
Medium
UI5 Web Components Version
1.15.1
Browser
Chrome
Operating System
No response
Additional Context
"@ui5/webcomponents": "1.15.1",
"@ui5/webcomponents-base": "1.15.1",
"@ui5/webcomponents-fiori": "1.15.1",
"@ui5/webcomponents-icons": "1.15.1",
"@ui5/webcomponents-icons-business-suite": "1.15.1",
"@ui5/webcomponents-localization": "1.15.1",
"@ui5/webcomponents-react": "1.17.3",
"@ui5/webcomponents-theming": "1.15.1",
Organization
No response
Declaration
- I’m not disclosing any internal or sensitive information.
Metadata
Metadata
Assignees
Type
Projects
Status