From 78a3dd776d26ec14f8dd37e113efaf6f8001e3f5 Mon Sep 17 00:00:00 2001 From: hinzzx Date: Tue, 10 Sep 2024 14:14:22 +0300 Subject: [PATCH 01/13] feat(ui5-filter-item, ui5-sort-item,..): add item-key property --- packages/fiori/src/FilterItem.ts | 9 +++++ packages/fiori/src/FilterItemOption.ts | 9 +++++ packages/fiori/src/SortItem.ts | 9 +++++ .../fiori/test/pages/ViewSettingsDialog.html | 22 ++++++++++++ .../test/specs/ViewSettingsDialog.spec.js | 34 ++++++++++++++++++- 5 files changed, 82 insertions(+), 1 deletion(-) diff --git a/packages/fiori/src/FilterItem.ts b/packages/fiori/src/FilterItem.ts index 70a40036ec68..6e7e71efb965 100644 --- a/packages/fiori/src/FilterItem.ts +++ b/packages/fiori/src/FilterItem.ts @@ -45,6 +45,15 @@ class FilterItem extends UI5Element { */ @slot() values!: Array; + + /** + * Defines a unique identifier for the component. + * @default undefined + * @public + * @since 2.3.0 + */ + @property() + itemKey?: string; } FilterItem.define(); diff --git a/packages/fiori/src/FilterItemOption.ts b/packages/fiori/src/FilterItemOption.ts index 11775afbb0e0..5256192207cd 100644 --- a/packages/fiori/src/FilterItemOption.ts +++ b/packages/fiori/src/FilterItemOption.ts @@ -36,6 +36,15 @@ class FilterItemOption extends UI5Element { */ @property({ type: Boolean }) selected = false; + + /** + * Defines a unique identifier for the component. + * @default undefined + * @public + * @since 2.3.0 + */ + @property() + itemKey?: string; } FilterItemOption.define(); diff --git a/packages/fiori/src/SortItem.ts b/packages/fiori/src/SortItem.ts index 4c36541b6569..3be37f1666c7 100644 --- a/packages/fiori/src/SortItem.ts +++ b/packages/fiori/src/SortItem.ts @@ -36,6 +36,15 @@ class SortItem extends UI5Element { */ @property({ type: Boolean }) selected = false; + + /** + * Defines a unique identifier for the component. + * @default undefined + * @public + * @since 2.3.0 + */ + @property() + itemKey?: string; } SortItem.define(); diff --git a/packages/fiori/test/pages/ViewSettingsDialog.html b/packages/fiori/test/pages/ViewSettingsDialog.html index a8c22d46df9f..cd61126eea7b 100644 --- a/packages/fiori/test/pages/ViewSettingsDialog.html +++ b/packages/fiori/test/pages/ViewSettingsDialog.html @@ -93,7 +93,29 @@

ViewSettingsDialog

+

ViewSettingsDialog with item-keys

+ + Show ViewSettingsDialog + + + + + + + + + + + + + + +