@dosgato/dialog 0.0.56 → 0.0.57
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/dist/tree/Tree.svelte +2 -2
- package/dist/tree/treestore.js +2 -2
- package/package.json +1 -1
package/dist/tree/Tree.svelte
CHANGED
|
@@ -65,9 +65,9 @@ function onKeyUp(e) {
|
|
|
65
65
|
if (!store.searchableFn)
|
|
66
66
|
return;
|
|
67
67
|
if (e.key.length === 1) {
|
|
68
|
-
search += e.key;
|
|
68
|
+
search += e.key.toLocaleLowerCase();
|
|
69
69
|
const searchItems = $store.focused?.parent ? $store.focused.parent.children : $store.rootItems;
|
|
70
|
-
const newFocus = searchItems?.find(itm => store.searchableFn(itm).some(str => str.toLocaleLowerCase().startsWith(search
|
|
70
|
+
const newFocus = searchItems?.find(itm => store.searchableFn(itm).some(str => str.toLocaleLowerCase().startsWith(search)));
|
|
71
71
|
if (newFocus)
|
|
72
72
|
store.focus(newFocus);
|
|
73
73
|
clearTimeout(searchTimer);
|
package/dist/tree/treestore.js
CHANGED
|
@@ -14,7 +14,7 @@ export class TreeStore extends ActiveStore {
|
|
|
14
14
|
for (const itm of this.value.rootItems ?? []) {
|
|
15
15
|
let found = false;
|
|
16
16
|
for (const val of this.searchableFn(itm)) {
|
|
17
|
-
if (val.startsWith(filter))
|
|
17
|
+
if (val.toLocaleLowerCase().startsWith(filter))
|
|
18
18
|
found = true;
|
|
19
19
|
}
|
|
20
20
|
if (found)
|
|
@@ -143,7 +143,7 @@ export class TreeStore extends ActiveStore {
|
|
|
143
143
|
this.refreshPromise = undefined;
|
|
144
144
|
}
|
|
145
145
|
filter(term, notify = true) {
|
|
146
|
-
this.value.filter = term;
|
|
146
|
+
this.value.filter = term?.toLocaleLowerCase();
|
|
147
147
|
if (notify)
|
|
148
148
|
this.trigger();
|
|
149
149
|
}
|
package/package.json
CHANGED