mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Extending widget
Summary: - Adding new option 'strictType' to widget mapping - Refreshing mappings when widget options are changed Test Plan: Updated Reviewers: JakubSerafin Reviewed By: JakubSerafin Differential Revision: https://phab.getgrist.com/D4061
This commit is contained in:
@@ -11,6 +11,7 @@ export const ColumnToMap = t.iface([], {
|
||||
"type": t.opt("string"),
|
||||
"optional": t.opt("boolean"),
|
||||
"allowMultiple": t.opt("boolean"),
|
||||
"strictType": t.opt("boolean"),
|
||||
});
|
||||
|
||||
export const ColumnsToMap = t.array(t.union("string", "ColumnToMap"));
|
||||
|
||||
@@ -16,7 +16,8 @@ export interface ColumnToMap {
|
||||
*/
|
||||
description?: string|null,
|
||||
/**
|
||||
* Column type, by default ANY.
|
||||
* Column types (as comma separated list), by default "Any", what means that any type is
|
||||
* allowed (unless strictType is true).
|
||||
*/
|
||||
type?: string, // GristType, TODO: ts-interface-checker doesn't know how to parse this
|
||||
/**
|
||||
@@ -27,6 +28,10 @@ export interface ColumnToMap {
|
||||
* Allow multiple column assignment, the result will be list of mapped table column names.
|
||||
*/
|
||||
allowMultiple?: boolean,
|
||||
/**
|
||||
* Match column type strictly, so "Any" will require "Any" and not any other type.
|
||||
*/
|
||||
strictType?: boolean,
|
||||
}
|
||||
|
||||
export type ColumnsToMap = (string|ColumnToMap)[];
|
||||
|
||||
Reference in New Issue
Block a user