@@ -190,12 +190,16 @@ type ViewSettingsDialogInternalMode = `${ViewSettingsDialogMode}` | ViewSettings
190190/**
191191 * Fired when the Reset button is clicked.
192192 *
193- * **Note:** Use this event to reset the state of custom tab content,
194- * as the component cannot detect changes within custom tabs.
193+ * **Note:** This event is particularly relevant when the dialog contains custom tabs.
194+ * By default, the Reset button resets all built-in settings (sort, filter, group) to their
195+ * initial values. However, the component has no knowledge of the content or state inside
196+ * custom tabs — it cannot detect what has changed or what the "default" values are.
197+ * Therefore, when this event is fired, it is the application developer's responsibility
198+ * to listen for it and manually reset the custom tab content to its initial state.
195199 * @since 2.22.0
196200 * @public
197201 */
198- @event ( "reset-click " , {
202+ @event ( "reset" , {
199203 bubbles : true ,
200204} )
201205class ViewSettingsDialog extends UI5Element {
@@ -205,7 +209,7 @@ class ViewSettingsDialog extends UI5Element {
205209 "before-open" : void ,
206210 "open" : void ,
207211 "close" : void ,
208- "reset-click " : void ,
212+ "reset" : void ,
209213 }
210214 /**
211215 * Defines the initial sort order.
@@ -234,18 +238,23 @@ class ViewSettingsDialog extends UI5Element {
234238 open = false ;
235239
236240 /**
237- * Defines whether the Reset button is always enabled.
241+ * Controls whether the Reset button is always enabled.
238242 *
239- * **Note:** By default, the Reset button is only enabled when the dialog settings
240- * differ from their initial state. Set this property to `true` to keep the Reset
241- * button always enabled, which is useful when working with custom tabs
242- * whose internal state changes cannot be detected by the component.
243+ * By default, the Reset button is enabled only when the built-in settings (Sort, Filter, Group)
244+ * differ from their initial state — the component can detect these changes automatically.
245+ * However, when the dialog contains custom tabs, the component has no way to detect
246+ * whether the custom tab content has been modified by the user.
247+ *
248+ * Set this property to `true` when the user has made changes inside a custom tab, so that
249+ * the Reset button becomes enabled and the user can trigger a reset.
250+ * Set it back to `false` once the custom tab content is back to its initial state
251+ * (e.g. after the user confirms or after a reset is applied).
243252 * @default false
244253 * @public
245254 * @since 2.22.0
246255 */
247256 @property ( { type : Boolean } )
248- enableReset = false ;
257+ resetEnabled = false ;
249258
250259 /**
251260 * Keeps recently focused list in order to focus it on next dialog open.
@@ -441,14 +450,7 @@ class ViewSettingsDialog extends UI5Element {
441450 }
442451
443452 get shouldBuildCustomTabs ( ) {
444- return ! ! this . _renderableCustomTabs . length ;
445- }
446-
447- /**
448- * Returns only custom tabs that have an icon defined and can be rendered.
449- */
450- get _renderableCustomTabs ( ) {
451- return this . customTabs . filter ( tab => tab . icon ) ;
453+ return ! ! this . customTabs . length ;
452454 }
453455
454456 get hasPagination ( ) {
@@ -457,7 +459,7 @@ class ViewSettingsDialog extends UI5Element {
457459 . length ;
458460
459461 if ( this . shouldBuildCustomTabs ) {
460- return builtInTabsCount + this . _renderableCustomTabs . length > 1 ;
462+ return builtInTabsCount + this . customTabs . length > 1 ;
461463 }
462464
463465 return builtInTabsCount > 1 ;
@@ -477,7 +479,7 @@ class ViewSettingsDialog extends UI5Element {
477479 }
478480
479481 if ( this . shouldBuildCustomTabs ) {
480- return this . _customTabMode ( this . _renderableCustomTabs [ 0 ] ) ;
482+ return this . _customTabMode ( this . customTabs [ 0 ] ) ;
481483 }
482484
483485 return ViewSettingsDialogMode . Sort ;
@@ -488,7 +490,7 @@ class ViewSettingsDialog extends UI5Element {
488490 return ;
489491 }
490492
491- return this . _renderableCustomTabs . find ( tab => this . _customTabMode ( tab ) === this . _currentMode ) ;
493+ return this . customTabs . find ( tab => this . _customTabMode ( tab ) === this . _currentMode ) ;
492494 }
493495
494496 get _filterByTitle ( ) {
@@ -574,7 +576,7 @@ class ViewSettingsDialog extends UI5Element {
574576 * Determines disabled state of the `Reset` button.
575577 */
576578 get _disableResetButton ( ) {
577- if ( this . enableReset ) {
579+ if ( this . resetEnabled ) {
578580 return false ;
579581 }
580582
@@ -903,7 +905,7 @@ class ViewSettingsDialog extends UI5Element {
903905 this . _recentlyFocused = this . _sortOrder ! ;
904906 this . _focusRecentlyUsedControl ( ) ;
905907 announce ( this . _resetButtonAction , InvisibleMessageMode . Assertive ) ;
906- this . fireDecoratorEvent ( "reset-click " ) ;
908+ this . fireDecoratorEvent ( "reset" ) ;
907909 }
908910
909911 /**
@@ -936,7 +938,7 @@ class ViewSettingsDialog extends UI5Element {
936938 }
937939
938940 if ( this . _isCustomMode ( mode ) ) {
939- return this . _renderableCustomTabs . some ( tab => this . _customTabMode ( tab ) === mode ) ;
941+ return this . customTabs . some ( tab => this . _customTabMode ( tab ) === mode ) ;
940942 }
941943
942944 return false ;
0 commit comments