Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ViewSettingsDialog | ui5-webcomponents] onConfirmEvent uses filter item text as key: #7579

Open
1 task done
22shubham22 opened this issue Sep 13, 2023 · 4 comments · May be fixed by #9838
Open
1 task done

[ViewSettingsDialog | ui5-webcomponents] onConfirmEvent uses filter item text as key: #7579

22shubham22 opened this issue Sep 13, 2023 · 4 comments · May be fixed by #9838

Comments

@22shubham22
Copy link

22shubham22 commented Sep 13, 2023

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 ->

MicrosoftTeams-image (16)

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

MicrosoftTeams-image (15)

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

MicrosoftTeams-image (17)

and console log the event details :

MicrosoftTeams-image (19) MicrosoftTeams-image (18)

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.
@22shubham22 22shubham22 added the bug This issue is a bug in the code label Sep 13, 2023
@NHristov-sap NHristov-sap added feature request Medium Prio TOPIC B and removed bug This issue is a bug in the code labels Sep 13, 2023
@NHristov-sap
Copy link
Contributor

Hello @SAP/ui5-webcomponents-topic-b,

Please take a look of this feature request.

Best Regards,
Mikolay Hristov

@22shubham22
Copy link
Author

Hi @hinzzx , By when can we expect this to be done ?

@DMihaylova
Copy link

Hello, @22shubham22,

Thank you for the feedback!

We'll need to firstly discus it on our team refinement meeting and then prioritise it among the rest of the requests we have.
We'll update you here once those aspects get clear. Have in mind that we're currently overloaded and there may be delay.

Thanks & Regards,
Diana

@DMihaylova
Copy link

Internally tracked as BGSOFUIBALKAN-8612.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
4 participants