@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.
@@ -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.toLocaleLowerCase())));
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);
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dosgato/dialog",
3
3
  "description": "A component library for building forms that edit a JSON document.",
4
- "version": "0.0.56",
4
+ "version": "0.0.57",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",
7
7
  "dev": "vite dev --force",