Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
fix: add label and string for linked selections
Browse files Browse the repository at this point in the history
  • Loading branch information
Caele committed Feb 18, 2020
1 parent f5d636e commit 8601683
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Expand Up @@ -59,6 +59,9 @@ export default function supernova(env) {
});

const translator = useTranslator();
useEffect(() => {
autoRegister(translator);
}, [translator]);

const resetSelections = () => {
setSelectionState([]);
Expand Down Expand Up @@ -104,6 +107,7 @@ export default function supernova(env) {
],
},
active: linked,
label: translator.get('Object.OrgChart.IncludeDescendants'),
}),
[linked]
);
Expand Down Expand Up @@ -153,7 +157,6 @@ export default function supernova(env) {
viewState && viewState.expandedState && setExpandedState(viewState.expandedState);
viewState && viewState.transform && setTransform(viewState.transform);

autoRegister(translator);
return treeTransform({ layout, model, translator }).then(transformed => {
setDataTree(transformed);
setStyling(stylingUtils.cardStyling({ Theme, layout }));
Expand Down
1 change: 1 addition & 0 deletions src/locale/en-US.js
Expand Up @@ -14,4 +14,5 @@ export default {
'Object.OrgChart.ColorLabelExpression': 'Color expression',
'Object.OrgChart.BackgroundColor': 'Background color',
'Object.OrgChart.FontColor': 'Font color',
'Object.OrgChart.IncludeDescendants': 'Include descendants',
};

0 comments on commit 8601683

Please sign in to comment.