diff options
Diffstat (limited to 'modern/src/settings/ComputedAttributePage.js')
-rw-r--r-- | modern/src/settings/ComputedAttributePage.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modern/src/settings/ComputedAttributePage.js b/modern/src/settings/ComputedAttributePage.js index 99bbfadb..2aa40ef0 100644 --- a/modern/src/settings/ComputedAttributePage.js +++ b/modern/src/settings/ComputedAttributePage.js @@ -39,10 +39,11 @@ const ComputedAttributePage = () => { } }; + const validate = () => item && item.description && item.expression; + return ( - <EditItemView endpoint="attributes/computed" item={item} setItem={setItem}> - {item - && ( + <EditItemView endpoint="attributes/computed" item={item} setItem={setItem} validate={validate}> + {item && ( <Accordion defaultExpanded> <AccordionSummary expandIcon={<ExpandMoreIcon />}> <Typography variant="subtitle1"> @@ -95,7 +96,7 @@ const ComputedAttributePage = () => { </FormControl> </AccordionDetails> </Accordion> - )} + )} </EditItemView> ); }; |