@lavalogic/scoria 0.37.27 → 0.37.29
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/Components/DateInput.svelte +1 -1
- package/dist/Components/DimensionInput.svelte +1 -1
- package/dist/Components/FileUpload.svelte +1 -1
- package/dist/Components/NumberInput.svelte +1 -1
- package/dist/Components/PasswordInput.svelte +1 -1
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/SelectDef.svelte.js +8 -5
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDef.svelte.js +18 -7
- package/dist/Components/TextInput.svelte +1 -1
- package/dist/scss/_mixins.scss +8 -3
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { memoiseRowAccessor } from '../../../../../../Helpers/memoiseByRow.js';
|
|
2
1
|
import { AccessorDef } from './AccessorDef.svelte.js';
|
|
3
2
|
import { AccessorType } from './AccessorType.js';
|
|
4
3
|
/**
|
|
@@ -11,10 +10,14 @@ import { AccessorType } from './AccessorType.js';
|
|
|
11
10
|
export class SelectDef extends AccessorDef {
|
|
12
11
|
constructor(props) {
|
|
13
12
|
super(props);
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
|
|
13
|
+
// Pass through `props.getSpecificOptions` unchanged. The previous
|
|
14
|
+
// `memoiseRowAccessor` wrapper cached the per-row option set by
|
|
15
|
+
// row identity, which made the cached option list stick around
|
|
16
|
+
// even when the row's mutable properties changed - subtle but
|
|
17
|
+
// real bug surface for any cell that wants different options
|
|
18
|
+
// after a sibling property is edited. Svelte's `$derived` in
|
|
19
|
+
// `TableSelect` already memoises the call correctly.
|
|
20
|
+
this.getSpecificOptions = $derived(props.getSpecificOptions);
|
|
18
21
|
this.optional = $derived(props.optional ?? false);
|
|
19
22
|
this.clearable = $derived(props.clearable ?? true);
|
|
20
23
|
this._filterFn = $state(props.filterFn);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { memoiseRowAccessor } from '../../../../../Helpers/memoiseByRow.js';
|
|
2
1
|
import { ColumnType } from '../ColumnType.js';
|
|
3
2
|
/**
|
|
4
3
|
* `ColumnDef<T, FilterFnType, OptionsType, TValue>` is the abstract base
|
|
@@ -46,12 +45,24 @@ export class ColumnDef {
|
|
|
46
45
|
this.resizable = $derived(props.resizable ?? true);
|
|
47
46
|
this.header = $derived(props.header);
|
|
48
47
|
this._filterValueType = $derived(props.filterValueType);
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
|
|
48
|
+
// Pass through `props.getDisplayValue` unchanged.
|
|
49
|
+
//
|
|
50
|
+
// We used to wrap this with `memoiseRowAccessor`, which caches the
|
|
51
|
+
// result by row identity in a WeakMap. That broke every editable
|
|
52
|
+
// cell whose display depends on a mutable row property: after a
|
|
53
|
+
// user edited e.g. `item.receiptLineId`, the next render still
|
|
54
|
+
// got the cached `null` from the first call and rows never
|
|
55
|
+
// updated (visible on the Receipt pod table's SKU column - the
|
|
56
|
+
// dropdown selection appeared not to take effect and the
|
|
57
|
+
// downstream Title / UoM columns never populated).
|
|
58
|
+
//
|
|
59
|
+
// Svelte's `$derived` at the cell layer (`TableSelect`,
|
|
60
|
+
// `FocusableImmutableCell`, ...) already memoises correctly: it
|
|
61
|
+
// only re-runs the user callback when its reactive inputs change
|
|
62
|
+
// (cell, row identity, column def, or any state read inside the
|
|
63
|
+
// user function's synchronous portion). The per-Def WeakMap was
|
|
64
|
+
// an extra correctness-eating layer.
|
|
65
|
+
this.getDisplayValue = $derived(props.getDisplayValue);
|
|
55
66
|
this.debug = $derived(props.debug ?? false);
|
|
56
67
|
this.getSortingFn = $derived(props.getSortingFn);
|
|
57
68
|
this.getOptions = $derived(props.getOptions);
|
package/dist/scss/_mixins.scss
CHANGED
|
@@ -1065,9 +1065,14 @@
|
|
|
1065
1065
|
|
|
1066
1066
|
.error-wrapper {
|
|
1067
1067
|
display: block;
|
|
1068
|
-
//
|
|
1069
|
-
// height: max(var(--input-height,
|
|
1070
|
-
|
|
1068
|
+
// `max()` requires at least two arguments. The previous
|
|
1069
|
+
// `height: max(var(--input-height, 3rem))` was invalid CSS and
|
|
1070
|
+
// the browser dropped the rule, leaving the wrapper at
|
|
1071
|
+
// `height: auto`, which collapsed inputs inside modals (e.g.
|
|
1072
|
+
// the Edit Receipt Attributes Line Details tab) to ~30px
|
|
1073
|
+
// because the inner `<input>` uses `height: 100%`. Use the
|
|
1074
|
+
// two-argument form that matches `.textarea-error-wrapper`.
|
|
1075
|
+
height: max(var(--input-height, #{sizing.$input-height}), 2rem);
|
|
1071
1076
|
width: var(--input-width, 100%);
|
|
1072
1077
|
|
|
1073
1078
|
&.for-table {
|