callable column editor support

This commit is contained in:
Shams mosowi
2020-02-11 12:56:52 +11:00
parent 3c99a8aa97
commit 9c9903755a

View File

@@ -80,6 +80,7 @@ const ColumnEditor = (props: any) => {
collectionPath: "",
config: {},
parentLabel: "",
callableName: "",
});
const [flags, setFlags] = useState(() => [""]);
const classes = useStyles();
@@ -133,6 +134,7 @@ const ColumnEditor = (props: any) => {
collectionPath: "",
config: {},
parentLabel: "",
callableName: "",
});
};
const onClose = (event: any) => {
@@ -192,6 +194,9 @@ const ColumnEditor = (props: any) => {
if (values.type === FieldType.subTable) {
updatables.push({ field: "parentLabel", value: values.parentLabel });
}
if (values.type === FieldType.action) {
updatables.push({ field: "callableName", value: values.callableName });
}
actions.update(props.column.idx, updatables);
handleClose();
clearValues();
@@ -277,6 +282,14 @@ const ColumnEditor = (props: any) => {
}}
/>
)}
{values.type === FieldType.action && (
<TextField
label={"Callable Name"}
onChange={e => {
setValue("callableName", e.target.value);
}}
/>
)}
<Grid container>
<Grid item xs={6}>
{column.isNew ? (