Some changes to the core code that will be helpful for other nodes.

This commit is contained in:
Aditya Toshniwal
2021-06-29 14:38:04 +05:30
committed by Akshay Joshi
parent 764677431f
commit b20558cb99
10 changed files with 61 additions and 29 deletions

View File

@@ -158,7 +158,7 @@ const ALLOWED_PROPS_FIELD_COMMON = [
];
const ALLOWED_PROPS_FIELD_FORM = [
'type', 'onChange'
'type', 'onChange', 'state',
];
const ALLOWED_PROPS_FIELD_CELL = [
@@ -168,7 +168,7 @@ const ALLOWED_PROPS_FIELD_CELL = [
export const MappedFormControl = (props)=>{
let newProps = {...props};
let typeProps = evalFunc(newProps.type, newProps.value);
let typeProps = evalFunc(null, newProps.type, newProps.state);
if(typeof(typeProps) === 'object') {
newProps = {
...newProps,
@@ -184,7 +184,7 @@ export const MappedFormControl = (props)=>{
export const MappedCellControl = (props)=>{
let newProps = {...props};
let cellProps = evalFunc(newProps.cell, newProps.row);
let cellProps = evalFunc(null, newProps.cell, newProps.row);
if(typeof(cellProps) === 'object') {
newProps = {
...newProps,