@updog/data-editor-wc 0.1.85 → 0.1.86
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/index.d.ts +15 -2
- package/index.js +11082 -10602
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -769,8 +769,21 @@ type DataEditorColumn = {
|
|
|
769
769
|
/** Format the display value without changing stored data. E.g. add `$` prefix. */
|
|
770
770
|
formatter?: (value: string) => string;
|
|
771
771
|
/**
|
|
772
|
-
* Transform a value
|
|
773
|
-
*
|
|
772
|
+
* Transform a value on its way into the store. Runs on every value arriving
|
|
773
|
+
* from outside the editor, so `loadData`, a file import, a remote source, a
|
|
774
|
+
* custom format, and a paste of text from another app all call it. A value
|
|
775
|
+
* moving inside the grid is left alone, so a manual edit, a fill, a paste of
|
|
776
|
+
* cells copied from the grid itself, undo, and redo never call it.
|
|
777
|
+
*
|
|
778
|
+
* The value arrives in the shape the cell is stored in. Numbers and dates
|
|
779
|
+
* canonicalize first, and a `select` value resolves through value matching
|
|
780
|
+
* first, so the transformer sees the option the user confirmed. On a
|
|
781
|
+
* `multiselect` column it runs once per token, the way `formatter` already
|
|
782
|
+
* reads that column. A token it empties leaves the list, and two tokens it
|
|
783
|
+
* makes equal collapse into one.
|
|
784
|
+
*
|
|
785
|
+
* It runs before validation, so a transformer that moves a value outside
|
|
786
|
+
* `editor.options` makes its own column fail a `oneOf` rule.
|
|
774
787
|
*/
|
|
775
788
|
transformer?: (value: unknown) => unknown;
|
|
776
789
|
/** How the cell is edited. Defaults to text input. */
|