You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of the ViewSettingsDialog won't work in internationalized applications as the only thing the confirm event returns is the text attribute related to the selected ui5-sort-item or ui5-filter-item-option.
For example, if I want to filter by "Name" in "Descending" order in English, the confirm event will return
{
sortOrder: "Descending",
sortBy: "Name"
}
while if the application is translated in French, it will return
{
sortOrder: "Décroissant",
sortBy: "Nom"
}
Thus, preventing us to make an API call with these criteria as the code isn't supposed to know that "Décroissant" means "Descending" and that the field we want to apply these filters to is "name" instead of "Nom".
Expected Behavior
There are a few possible solutions:
As for SAPUI5 ViewSettingsItem, you could add the ability to provide a key that will be returned alongside the item text attribute when firing the confirm event.
In the confirm event, instead of only returning the text attribute, you could also return the whole HTMLElement that has been selected (similar to the List). This would allow developers to add whatever they want to the element dataset.
Context
UI5 Web Components version: 1.0.1
Affected component: ViewDetailsDialog
Priority
Low
Medium
High
Very High
Stakeholder Info (if applicable)
Organization: SuccessFactors
The text was updated successfully, but these errors were encountered:
…cel events (#4772)
The confirm event now contains two more fields:
sortByItem selected item (reference to element)
sortDescending Boolean result for SortOrder (if is true - Descending order is selected)
Fixes: #4539
…cel events (#4772)
The confirm event now contains two more fields:
sortByItem selected item (reference to element)
sortDescending Boolean result for SortOrder (if is true - Descending order is selected)
Fixes: #4539
Bug Description
The current implementation of the ViewSettingsDialog won't work in internationalized applications as the only thing the
confirm
event returns is the text attribute related to the selectedui5-sort-item
orui5-filter-item-option
.For example, if I want to filter by "Name" in "Descending" order in English, the confirm event will return
while if the application is translated in French, it will return
Thus, preventing us to make an API call with these criteria as the code isn't supposed to know that "Décroissant" means "Descending" and that the field we want to apply these filters to is "name" instead of "Nom".
Expected Behavior
There are a few possible solutions:
key
that will be returned alongside the item text attribute when firing theconfirm
event.confirm
event, instead of only returning the text attribute, you could also return the wholeHTMLElement
that has been selected (similar to the List). This would allow developers to add whatever they want to the elementdataset
.Context
Priority
Stakeholder Info (if applicable)
The text was updated successfully, but these errors were encountered: