@@ -13,7 +13,7 @@ import Button from "@ui5/webcomponents/dist/Button.js";
1313import Label from "@ui5/webcomponents/dist/Label.js" ;
1414import ListItemGroup from "@ui5/webcomponents/dist/ListItemGroup.js" ;
1515import List from "@ui5/webcomponents/dist/List.js" ;
16- import type { ListItemClickEventDetail } from "@ui5/webcomponents/dist/List.js" ;
16+ import type { ListItemClickEventDetail , ListSelectionChangeEventDetail } from "@ui5/webcomponents/dist/List.js" ;
1717import ListItemStandard from "@ui5/webcomponents/dist/ListItemStandard.js" ;
1818import Title from "@ui5/webcomponents/dist/Title.js" ;
1919import SegmentedButton from "@ui5/webcomponents/dist/SegmentedButton.js" ;
@@ -553,20 +553,22 @@ class ViewSettingsDialog extends UI5Element {
553553 this . _currentMode = ViewSettingsDialogMode [ mode ] ;
554554 }
555555
556- _handleFilterValueItemClick ( e : CustomEvent < ListItemClickEventDetail > ) {
556+ _handleFilterValueItemClick ( e : CustomEvent < ListSelectionChangeEventDetail > ) {
557+ const itemText = e . detail . targetItem . innerText ;
558+
557559 // Update the component state
558560 this . _currentSettings . filters = this . _currentSettings . filters . map ( filter => {
559561 if ( filter . selected ) {
560562 filter . filterOptions . forEach ( option => {
561- if ( option . text === e . detail . item . innerText ) {
563+ if ( option . text === itemText ) {
562564 option . selected = ! option . selected ;
563565 }
564566 } ) ;
565567 }
566568 return filter ;
567569 } ) ;
568570
569- this . _setSelectedProp ( e ) ;
571+ this . _setSelectedProp ( itemText ) ;
570572
571573 this . _currentSettings = JSON . parse ( JSON . stringify ( this . _currentSettings ) ) ;
572574 }
@@ -576,10 +578,10 @@ class ViewSettingsDialog extends UI5Element {
576578 * @param e
577579 * @private
578580 */
579- _setSelectedProp ( e : CustomEvent < ListItemClickEventDetail > ) {
581+ _setSelectedProp ( itemText : string ) {
580582 this . filterItems . forEach ( filterItem => {
581583 filterItem . values . forEach ( option => {
582- if ( option . text === e . detail . item . innerText ) {
584+ if ( option . text === itemText ) {
583585 option . selected = ! option . selected ;
584586 }
585587 } ) ;
@@ -706,10 +708,10 @@ class ViewSettingsDialog extends UI5Element {
706708 /**
707709 * Stores `Sort Order` list as recently used control and its selected item in current state.
708710 */
709- _onSortOrderChange ( e : CustomEvent < ListItemClickEventDetail > ) {
711+ _onSortOrderChange ( e : CustomEvent < ListSelectionChangeEventDetail > ) {
710712 this . _recentlyFocused = this . _sortOrder ! ;
711713 this . _currentSettings . sortOrder = this . initSortOrderItems . map ( item => {
712- item . selected = item . text === e . detail . item . innerText ;
714+ item . selected = item . text === e . detail . targetItem . innerText ;
713715 return item ;
714716 } ) ;
715717
@@ -720,8 +722,8 @@ class ViewSettingsDialog extends UI5Element {
720722 /**
721723 * Stores `Sort By` list as recently used control and its selected item in current state.
722724 */
723- _onSortByChange ( e : CustomEvent < ListItemClickEventDetail > ) {
724- const selectedItemIndex = Number ( e . detail . item . getAttribute ( "data-ui5-external-action-item-index" ) ) ;
725+ _onSortByChange ( e : CustomEvent < ListSelectionChangeEventDetail > ) {
726+ const selectedItemIndex = Number ( e . detail . targetItem . getAttribute ( "data-ui5-external-action-item-index" ) ) ;
725727 this . _recentlyFocused = this . _sortBy ! ;
726728 this . _currentSettings . sortBy = this . initSortByItems . map ( ( item , index ) => {
727729 item . selected = index === selectedItemIndex ;
0 commit comments