Port Domain and Domain Constraints node to react. Fixes #6330

This commit is contained in:
Akshay Joshi
2021-07-23 18:19:10 +05:30
parent 438d591d5b
commit 6d18842dd3
9 changed files with 642 additions and 245 deletions

View File

@@ -11,7 +11,7 @@ import React, { useCallback } from 'react';
import _ from 'lodash';
import { FormInputText, FormInputSelect, FormInputSwitch, FormInputCheckbox, FormInputColor, FormInputFileSelect, FormInputToggle, InputSwitch, FormInputSQL } from '../components/FormComponents';
import { InputSelect, InputText } from '../components/FormComponents';
import { InputSelect, InputText, InputCheckbox } from '../components/FormComponents';
import Privilege from '../components/Privilege';
import { evalFunc } from 'sources/utils';
import PropTypes from 'prop-types';
@@ -172,6 +172,9 @@ function MappedCellControlBase({cell, value, id, optionsLoaded, onCellChange, vi
case 'switch':
return <InputSwitch name={name} value={value}
onChange={(e)=>onTextChange(e.target.checked, e.target.name)} {...props} />;
case 'checkbox':
return <InputCheckbox name={name} value={value}
onChange={(e)=>onTextChange(e.target.checked, e.target.name)} {...props} />;
case 'privilege':
return <Privilege name={name} value={value} onChange={onTextChange} {...props}/>;
default: