Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}, {
name: 'endValue',
component: TextField,
props: {
type: 'number',
},
validators: [{
validator: value => (value !== ''),
message: 'required',
}, /* ,{
validator: value => Number(value) <= Number(legendItemStore.getState().model.startValue) ? false : true,
message: 'should_be_higher_than_start_value',
} */],
}, { // Defined in data-table/data-value/Color.component.js
name: 'color',
component: mapProps(props => ({
color: props.value,
onChange(color) {
props.onChange(createFakeEvent(color));
},
}), ColorPicker),
}];
// Called when a field is changed
export function onFieldChange(fieldName, value) {
const model = legendItemStore.getState().model;
model[fieldName] = value;
legendItemStore.setState({
...legendItemStore.getState(),