Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions types/plotly.js/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1684,6 +1684,7 @@ export interface PlotData {
zsmooth: "fast" | "best" | false;
zmin: number;
zmax: number;
zorder: number;
ygap: number;
xgap: number;
transpose: boolean;
Expand Down
13 changes: 10 additions & 3 deletions types/tabulator-tables/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,14 @@ export interface ColumnDefinition extends ColumnLayout, CellCallbacks {
*
* Validators can be applied by using the validator property in a columns definition object (see Define Columns for more details).
*/
validator?: StandardValidatorType | StandardValidatorType[] | Validator | Validator[] | string | undefined;
validator?:
| StandardValidatorType
| StandardValidatorType[]
| Validator
| Validator[]
| string
| undefined
| ((cell: CellComponent, value: any) => boolean);

/**
* Mutators are used to alter data as it is parsed into For example if you wanted to convert a numeric column into a boolean based on its value, before the data is used to build the table.
Expand Down Expand Up @@ -1657,7 +1664,7 @@ export type Editor =
onRendered: EmptyCallback,
success: ValueBooleanCallback,
cancel: ValueVoidCallback,
editorParams: {},
editorParams: Record<string, unknown>,
) => HTMLElement | false);

export type EditorParams =
Expand All @@ -1669,7 +1676,7 @@ export type EditorParams =
| DateParams
| TimeParams
| DateTimeEditorParams
| ((cell: CellComponent) => {});
| ((cell: CellComponent) => Record<string, unknown>);

export type ScrollToRowPosition = "top" | "center" | "bottom" | "nearest";
export type PopupPosition = ColumnDefinitionAlign | "top" | "bottom";
Expand Down
1 change: 1 addition & 0 deletions types/tabulator-tables/tabulator-tables-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ colDef.validator = {
};
colDef.validator = "float";
colDef.validator = { type: "float", parameters: {} };
colDef.validator = (cell, value) => true;

let validators: Validator[] = [
{ type: "integer", parameters: {} },
Expand Down