mirror of
https://github.com/rowyio/rowy.git
synced 2026-02-25 04:31:34 +01:00
callable column editor support
This commit is contained in:
@@ -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 ? (
|
||||
|
||||
Reference in New Issue
Block a user