@refinitiv-ui/elements 6.18.3 → 6.18.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [6.18.4](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.18.3...@refinitiv-ui/elements@6.18.4) (2024-08-26)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **tree-select:** fix item interface doesn't sync with values ([#1208](https://github.com/Refinitiv/refinitiv-ui/issues/1208)) ([543e0cf](https://github.com/Refinitiv/refinitiv-ui/commit/543e0cf533a6dc848fa359ed5e23e70ecc389979))
11
+
6
12
  ## [6.18.3](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.18.2...@refinitiv-ui/elements@6.18.3) (2024-08-13)
7
13
 
8
14
  ### Bug Fixes
@@ -114,6 +114,12 @@ export declare class TreeSelect extends ComboBox<TreeSelectDataItem> {
114
114
  */
115
115
  get values(): string[];
116
116
  set values(values: string[]);
117
+ /**
118
+ * Update composer values.
119
+ * @param newValues new values
120
+ * @returns {void}
121
+ */
122
+ protected updateComposerValues(newValues: string[]): void;
117
123
  /**
118
124
  * Renderer used to render tree item elements
119
125
  */
@@ -194,6 +194,28 @@ let TreeSelect = class TreeSelect extends ComboBox {
194
194
  this.requestUpdate('values', oldValues);
195
195
  }
196
196
  }
197
+ /**
198
+ * Update composer values.
199
+ * @param newValues new values
200
+ * @returns {void}
201
+ */
202
+ updateComposerValues(newValues) {
203
+ for (const item of this.treeManager.checkedItems) {
204
+ this.treeManager.uncheckItem(item);
205
+ }
206
+ const selectedItems = this.queryItems((item, composer) => {
207
+ return newValues.includes(composer.getItemPropertyValue(item, 'value') ?? '');
208
+ });
209
+ const sortedSelectedItem = [];
210
+ for (const item of selectedItems) {
211
+ const value = this.composer.getItemPropertyValue(item, 'value') ?? '';
212
+ const index = newValues.indexOf(value);
213
+ sortedSelectedItem[index] = item;
214
+ }
215
+ for (const item of sortedSelectedItem) {
216
+ this.treeManager.checkItem(item);
217
+ }
218
+ }
197
219
  /**
198
220
  * Set maximum number of selected items
199
221
  * @param value max value
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '6.18.3';
1
+ export const VERSION = '6.18.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refinitiv-ui/elements",
3
- "version": "6.18.3",
3
+ "version": "6.18.4",
4
4
  "description": "Element Framework Elements",
5
5
  "author": "LSEG",
6
6
  "license": "Apache-2.0",
@@ -370,5 +370,5 @@
370
370
  "publishConfig": {
371
371
  "access": "public"
372
372
  },
373
- "gitHead": "7b8d10d848330ff50ae379e64ba5deb9db47190e"
373
+ "gitHead": "85921c6259adfee828da3aa542379fae1f9dae9d"
374
374
  }