How to use the dash-table/components/Table/props.ChangeAction.Coerce function in dash-table

To help you get started, we’ve selected a few dash-table examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github plotly / dash-table / demo / AppMode.ts View on Github external
R.forEach(column => {
        column.on_change = {
            action: ChangeAction.Coerce,
            failure: ChangeFailure.Reject
        };
    }, state.tableProps.columns || []);
github plotly / dash-table / src / dash-table / type / reconcile.ts View on Github external
function doAction(value: any, c: Options) {
    const action = (c && c.on_change && c.on_change.action) || ChangeAction.Coerce;

    switch (action) {
        case ChangeAction.Coerce:
            return { action, ...getCoercer(c)(value, c) };
        case ChangeAction.None:
            return { success: true, value, action };
        case ChangeAction.Validate:
            return { action, ...getValidator(c)(value, c) };
    }
}
github plotly / dash-table / src / dash-table / type / reconcile.ts View on Github external
function doAction(value: any, c: Options) {
    const action = (c && c.on_change && c.on_change.action) || ChangeAction.Coerce;

    switch (action) {
        case ChangeAction.Coerce:
            return { action, ...getCoercer(c)(value, c) };
        case ChangeAction.None:
            return { success: true, value, action };
        case ChangeAction.Validate:
            return { action, ...getValidator(c)(value, c) };
    }
}