@refinitiv-ui/elements 6.18.3 → 6.18.5
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 +12 -0
- package/lib/combo-box/index.js +4 -0
- package/lib/tree/elements/tree.js +1 -1
- package/lib/tree-select/index.d.ts +6 -0
- package/lib/tree-select/index.js +22 -0
- package/lib/version.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.5](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.18.4...@refinitiv-ui/elements@6.18.5) (2024-09-23)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **tree, tree-select, combo-box:** apply filter when it's updated ([#1218](https://github.com/Refinitiv/refinitiv-ui/issues/1218)) ([af9f339](https://github.com/Refinitiv/refinitiv-ui/commit/af9f3393ecd321760c61f4811f51a57155e1f99a))
|
|
11
|
+
|
|
12
|
+
## [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)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- **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))
|
|
17
|
+
|
|
6
18
|
## [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
19
|
|
|
8
20
|
### Bug Fixes
|
package/lib/combo-box/index.js
CHANGED
|
@@ -509,6 +509,10 @@ let ComboBox = class ComboBox extends FormFieldElement {
|
|
|
509
509
|
if (changedProperties.has('data') && this.opened) {
|
|
510
510
|
triggerResize();
|
|
511
511
|
}
|
|
512
|
+
// If filter has been updated, filter items again with the updated filter.
|
|
513
|
+
if (changedProperties.has('filter')) {
|
|
514
|
+
this.filterItems();
|
|
515
|
+
}
|
|
512
516
|
super.update(changedProperties);
|
|
513
517
|
}
|
|
514
518
|
/**
|
|
@@ -254,7 +254,7 @@ let Tree = class Tree extends List {
|
|
|
254
254
|
if (changeProperties.has('noRelation') || changeProperties.has('multiple')) {
|
|
255
255
|
this.manager.setMode(this.mode);
|
|
256
256
|
}
|
|
257
|
-
if (changeProperties.has('query') || changeProperties.has('data')) {
|
|
257
|
+
if (changeProperties.has('query') || changeProperties.has('data') || changeProperties.has('filter')) {
|
|
258
258
|
this.filterItems();
|
|
259
259
|
}
|
|
260
260
|
}
|
|
@@ -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
|
*/
|
package/lib/tree-select/index.js
CHANGED
|
@@ -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.
|
|
1
|
+
export const VERSION = '6.18.5';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinitiv-ui/elements",
|
|
3
|
-
"version": "6.18.
|
|
3
|
+
"version": "6.18.5",
|
|
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": "
|
|
373
|
+
"gitHead": "a0494fbf3faf992f4632d5c4b1f5e18f752ab44e"
|
|
374
374
|
}
|