@dosgato/dialog 0.0.66 → 0.0.67

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.
@@ -30,10 +30,12 @@ function updateValue(valu, sVal, fDes) {
30
30
  function reactToChoices(..._) {
31
31
  if (!stVal)
32
32
  return;
33
- if (!choices.length)
33
+ if (!choices.length) {
34
34
  stVal(finalDeserialize(''));
35
- if (!choices.some(o => o.value === val))
36
- stVal(notNull ? choices[0].value : finalDeserialize(''));
35
+ return;
36
+ }
37
+ if (!choices.some(o => o.value === finalDeserialize(val)))
38
+ stVal(notNull ? defaultValue : finalDeserialize(''));
37
39
  }
38
40
  $: reactToChoices(choices);
39
41
  onMount(reactToChoices);
@@ -36,7 +36,7 @@ function reactToChoices(..._) {
36
36
  stVal(finalDeserialize(''));
37
37
  return;
38
38
  }
39
- if (!choices.some(o => o.value === val))
39
+ if (!choices.some(o => o.value === finalDeserialize(val)))
40
40
  stVal(notNull ? defaultValue : finalDeserialize(''));
41
41
  }
42
42
  $: reactToChoices(choices);
@@ -154,7 +154,7 @@ $: myRootItems = $store && $filteredRootItems;
154
154
  <div class="tree-header" class:resizing={!!dragheaderid} use:resize={{ store: treeWidth }} aria-hidden="true" on:mouseup={headerDragEnd} on:touchend={headerDragEnd} on:mousemove={dragheaderid ? headerDrag : undefined} on:touchmove={dragheaderid ? headerDrag : undefined}>
155
155
  <div class="checkbox" bind:this={checkboxelement}>&nbsp;</div>
156
156
  {#each headers as header, i (header.label)}
157
- <div bind:this={headerelements[i]} id={header.id} class="tree-header-cell {header.id}" style:width={$headerOverride[header.id] ?? $headerSizes?.[i]}>{header.label}{#if i === 0 && $store.loading}<LoadIcon />{/if}{#if i === 0 && isNotBlank(search)}&nbsp;(searching: {search}){/if}</div>
157
+ <div bind:this={headerelements[i]} id={header.id} class="tree-header-cell {header.id}" style:width={$headerOverride[header.id] ?? $headerSizes?.[i]} style:padding-left={i === 0 ? '1.4em' : undefined}>{header.label}{#if i === 0 && $store.loading}<LoadIcon />{/if}{#if i === 0 && isNotBlank(search)}&nbsp;(searching: {search}){/if}</div>
158
158
  {#if enableResize && i !== headers.length - 1}<div class="tree-separator" on:mousedown={headerDragStart(header, i)} on:touchstart={headerDragStart(header, i)} on:dblclick={headerDragReset}>&nbsp;</div>{/if}
159
159
  {/each}
160
160
  </div>
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.66",
4
+ "version": "0.0.67",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",
7
7
  "dev": "vite dev --force",