diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-21 14:24:52 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-21 18:31:07 -0700 |
commit | 4cdda2a42d673a901f39ecf6a24478ec683654a2 (patch) | |
tree | 0c0ea01718cc4af86ae74e1d69fe2361093b5c36 /modern | |
parent | 29653ad898b6ec29c5d2675fe188aeac53ec3c19 (diff) | |
download | trackermap-web-4cdda2a42d673a901f39ecf6a24478ec683654a2.tar.gz trackermap-web-4cdda2a42d673a901f39ecf6a24478ec683654a2.tar.bz2 trackermap-web-4cdda2a42d673a901f39ecf6a24478ec683654a2.zip |
Fix attribute selection
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/settings/UserPage.js | 1 | ||||
-rw-r--r-- | modern/src/settings/components/EditAttributesAccordion.js | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/modern/src/settings/UserPage.js b/modern/src/settings/UserPage.js index b3608015..8bae2e59 100644 --- a/modern/src/settings/UserPage.js +++ b/modern/src/settings/UserPage.js @@ -345,6 +345,7 @@ const UserPage = () => { </AccordionDetails> </Accordion> <EditAttributesAccordion + attribute={attribute} attributes={item.attributes} setAttributes={(attributes) => setItem({ ...item, attributes })} definitions={{ ...commonUserAttributes, ...userAttributes }} diff --git a/modern/src/settings/components/EditAttributesAccordion.js b/modern/src/settings/components/EditAttributesAccordion.js index d159dafe..54ded187 100644 --- a/modern/src/settings/components/EditAttributesAccordion.js +++ b/modern/src/settings/components/EditAttributesAccordion.js @@ -39,7 +39,7 @@ const useStyles = makeStyles((theme) => ({ }, })); -const EditAttributesAccordion = ({ attributes, setAttributes, definitions, focusAttribute }) => { +const EditAttributesAccordion = ({ attribute, attributes, setAttributes, definitions, focusAttribute }) => { const classes = useStyles(); const t = useTranslation(); @@ -160,7 +160,7 @@ const EditAttributesAccordion = ({ attributes, setAttributes, definitions, focus }; return features.disableAttributes ? '' : ( - <Accordion> + <Accordion defaultExpanded={!!attribute}> <AccordionSummary expandIcon={<ExpandMoreIcon />}> <Typography variant="subtitle1"> {t('sharedAttributes')} |