@kws3/ui 2.3.1 → 2.3.3
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.mdx +10 -0
- package/forms/AutoComplete.svelte +6 -1
- package/forms/select/MultiSelect.svelte +27 -17
- package/helpers/InfiniteList.svelte +0 -1
- package/package.json +2 -2
package/CHANGELOG.mdx
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# 2.3.3
|
|
2
|
+
- `InfiniteList` - do not fake a scroll event on a resize event, fixes loading bugs
|
|
3
|
+
|
|
4
|
+
# 2.3.2
|
|
5
|
+
- `MultiSelect` - fixed issue where raw object were initially outputted (if provided)
|
|
6
|
+
- `SearchableSelect and `MultiSelect` (Async): resolved issue with the 'active' class not attaching to the most matched item in dropdown options
|
|
7
|
+
- `SearchableSelect` - improved behavior, ensuring the `tab` key correctly loses focus
|
|
8
|
+
- `AutoComplete` - dropdown now closes on loss of focus triggered by the `tab` key
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
# 2.3.1
|
|
2
12
|
- `DatePicker` - add support for configurable border radius
|
|
3
13
|
- `DatePicker` - add support for configurable box shadow
|
|
@@ -470,7 +470,7 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
470
470
|
) {
|
|
471
471
|
activeOption = filteredOptions[0];
|
|
472
472
|
} else {
|
|
473
|
-
if (allow_fuzzy_match) {
|
|
473
|
+
if (asyncMode || allow_fuzzy_match) {
|
|
474
474
|
activeOption = filteredOptions.find((opts) =>
|
|
475
475
|
matchesValue(activeOption, opts)
|
|
476
476
|
);
|
|
@@ -557,22 +557,28 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
557
557
|
//normalize value for single versus multiselect
|
|
558
558
|
if (value === null || typeof value == "undefined") {
|
|
559
559
|
value = single ? null : [];
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
560
|
+
} else {
|
|
561
|
+
if (asyncMode) {
|
|
562
|
+
// initally on async mode options are empty
|
|
563
|
+
// so we need to fill selectedOptions with value if value is avaliable
|
|
564
|
+
options = value ? [...(single ? [value] : [...value])] : [];
|
|
565
|
+
searching = false;
|
|
566
|
+
tick().then(() => {
|
|
567
|
+
normaliseOptions();
|
|
568
|
+
value = normaliseArraysToObjects(options).map(
|
|
569
|
+
(v) => v[used_value_key]
|
|
570
|
+
);
|
|
571
|
+
if (single && Array.isArray(value)) {
|
|
572
|
+
value = value[0];
|
|
573
|
+
}
|
|
574
|
+
fillSelectedOptions();
|
|
575
|
+
clearDropDownResults();
|
|
576
|
+
});
|
|
577
|
+
} else {
|
|
578
|
+
value = single
|
|
579
|
+
? value
|
|
580
|
+
: normaliseArraysToObjects(value).map((v) => v[used_value_key]);
|
|
581
|
+
}
|
|
576
582
|
}
|
|
577
583
|
|
|
578
584
|
return () => {
|
|
@@ -729,6 +735,10 @@ Default value: `<span>{option[search_key] || option}</span>`
|
|
|
729
735
|
searching = true;
|
|
730
736
|
}
|
|
731
737
|
} else {
|
|
738
|
+
if (event.key === `Tab`) {
|
|
739
|
+
searching = false;
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
732
742
|
//for a single select
|
|
733
743
|
//if a value is already selected,
|
|
734
744
|
//ignore keys other than navigation, enter and backspace
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kws3/ui",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "UI components for use with Svelte v3 applications.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"svelte": "index.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"typescript": "^5.0.4"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "f2433c3417de63b6e7e3f64c3eff524d7fa0fd9c"
|
|
39
39
|
}
|