@kanunilabs/datagrid-react 1.8.10 → 1.8.11

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/index.d.cts CHANGED
@@ -2977,6 +2977,14 @@ interface GridLookupEditorProps {
2977
2977
  * Deleting is always free; ignored with `allowCustom`.
2978
2978
  */
2979
2979
  restrictInput?: boolean;
2980
+ /**
2981
+ * Complete while typing (`lookup.typeAhead`, P-17), like a Delphi lookup
2982
+ * combo: the first item whose label STARTS with the text completes in the
2983
+ * box (the added part selected) and is highlighted; with no such item the
2984
+ * first match is only highlighted. Enter, Tab and leaving pick the
2985
+ * highlighted item; no match picks nothing. Ignored with `allowCustom`.
2986
+ */
2987
+ typeAhead?: boolean;
2980
2988
  /**
2981
2989
  * Complete typed text to the one item left / an exact label on leaving.
2982
2990
  * Default true. False: the "pick from the list" rule (K-3, see the top).
@@ -3031,7 +3039,7 @@ interface GridLookupEditorProps {
3031
3039
  */
3032
3040
  declare function matchOptions(options: readonly LookupItem[], query: string, mode: LookupMatchMode): readonly LookupItem[];
3033
3041
  /** The editor's settings that come straight from a column's `lookup`. */
3034
- type LookupEditorSettings = Pick<GridLookupEditorProps, 'matchMode' | 'codeMatchMode' | 'linked' | 'allowCustom' | 'autoCompleteSingle' | 'onNoMatch' | 'matchFold' | 'openOnEdit' | 'restrictInput'>;
3042
+ type LookupEditorSettings = Pick<GridLookupEditorProps, 'matchMode' | 'codeMatchMode' | 'linked' | 'allowCustom' | 'autoCompleteSingle' | 'onNoMatch' | 'matchFold' | 'openOnEdit' | 'restrictInput' | 'typeAhead'>;
3035
3043
  /** `lookup` → the editor's props, one reading for the cell, row and form editors. */
3036
3044
  declare function lookupEditorSettings(lookup: ColumnLookup<never> | undefined): LookupEditorSettings;
3037
3045
  /**
@@ -3040,7 +3048,7 @@ declare function lookupEditorSettings(lookup: ColumnLookup<never> | undefined):
3040
3048
  * neither — a plain pick, one cell, as before.
3041
3049
  */
3042
3050
  declare function lookupPickValues(lookup: ColumnLookup<never> | undefined, columnId: string, item: LookupItem): Record<string, unknown> | null;
3043
- declare function GridLookupEditor({ options, value, matchMode, codeMatchMode, matchFold, linked, allowCustom, openOnEdit, seeded, restrictInput, autoCompleteSingle, onNoMatch, onPick, invalid, autoFocus, testId, columnId, ariaLabel, onChange, onCommit, commitOnPick, onCancel, onTab, onBlurCommit, }: GridLookupEditorProps): react.JSX.Element;
3051
+ declare function GridLookupEditor({ options, value, matchMode, codeMatchMode, matchFold, linked, allowCustom, openOnEdit, seeded, restrictInput, typeAhead, autoCompleteSingle, onNoMatch, onPick, invalid, autoFocus, testId, columnId, ariaLabel, onChange, onCommit, commitOnPick, onCancel, onTab, onBlurCommit, }: GridLookupEditorProps): react.JSX.Element;
3044
3052
 
3045
3053
  interface GridCellEditorProps {
3046
3054
  value: unknown;
package/dist/index.d.ts CHANGED
@@ -2977,6 +2977,14 @@ interface GridLookupEditorProps {
2977
2977
  * Deleting is always free; ignored with `allowCustom`.
2978
2978
  */
2979
2979
  restrictInput?: boolean;
2980
+ /**
2981
+ * Complete while typing (`lookup.typeAhead`, P-17), like a Delphi lookup
2982
+ * combo: the first item whose label STARTS with the text completes in the
2983
+ * box (the added part selected) and is highlighted; with no such item the
2984
+ * first match is only highlighted. Enter, Tab and leaving pick the
2985
+ * highlighted item; no match picks nothing. Ignored with `allowCustom`.
2986
+ */
2987
+ typeAhead?: boolean;
2980
2988
  /**
2981
2989
  * Complete typed text to the one item left / an exact label on leaving.
2982
2990
  * Default true. False: the "pick from the list" rule (K-3, see the top).
@@ -3031,7 +3039,7 @@ interface GridLookupEditorProps {
3031
3039
  */
3032
3040
  declare function matchOptions(options: readonly LookupItem[], query: string, mode: LookupMatchMode): readonly LookupItem[];
3033
3041
  /** The editor's settings that come straight from a column's `lookup`. */
3034
- type LookupEditorSettings = Pick<GridLookupEditorProps, 'matchMode' | 'codeMatchMode' | 'linked' | 'allowCustom' | 'autoCompleteSingle' | 'onNoMatch' | 'matchFold' | 'openOnEdit' | 'restrictInput'>;
3042
+ type LookupEditorSettings = Pick<GridLookupEditorProps, 'matchMode' | 'codeMatchMode' | 'linked' | 'allowCustom' | 'autoCompleteSingle' | 'onNoMatch' | 'matchFold' | 'openOnEdit' | 'restrictInput' | 'typeAhead'>;
3035
3043
  /** `lookup` → the editor's props, one reading for the cell, row and form editors. */
3036
3044
  declare function lookupEditorSettings(lookup: ColumnLookup<never> | undefined): LookupEditorSettings;
3037
3045
  /**
@@ -3040,7 +3048,7 @@ declare function lookupEditorSettings(lookup: ColumnLookup<never> | undefined):
3040
3048
  * neither — a plain pick, one cell, as before.
3041
3049
  */
3042
3050
  declare function lookupPickValues(lookup: ColumnLookup<never> | undefined, columnId: string, item: LookupItem): Record<string, unknown> | null;
3043
- declare function GridLookupEditor({ options, value, matchMode, codeMatchMode, matchFold, linked, allowCustom, openOnEdit, seeded, restrictInput, autoCompleteSingle, onNoMatch, onPick, invalid, autoFocus, testId, columnId, ariaLabel, onChange, onCommit, commitOnPick, onCancel, onTab, onBlurCommit, }: GridLookupEditorProps): react.JSX.Element;
3051
+ declare function GridLookupEditor({ options, value, matchMode, codeMatchMode, matchFold, linked, allowCustom, openOnEdit, seeded, restrictInput, typeAhead, autoCompleteSingle, onNoMatch, onPick, invalid, autoFocus, testId, columnId, ariaLabel, onChange, onCommit, commitOnPick, onCancel, onTab, onBlurCommit, }: GridLookupEditorProps): react.JSX.Element;
3044
3052
 
3045
3053
  interface GridCellEditorProps {
3046
3054
  value: unknown;