Skip to content

Commit

Permalink
chore(org unit tree): adjust stories with custom label after rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammer5 committed Aug 3, 2021
1 parent 28c037f commit 4d8a042
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ export const CustomNodeLabel = () => (

return OrganisationUnitTree.defaultProps.renderNodeLabel({
...data,
node: {
...data.node,
displayName: <span>--- {data.node.displayName}</span>,
},
label: <span>--- {data.node.displayName}</span>,
})
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const CustomRequests = () => {
fetchRootOrgData={fetchRootOrgData}
name="Root org unit"
roots={['A0000000000']}
initiallyExpanded={['/A0000000000/A0000000001']}
initiallyExpanded={['/A0000000000/A0000000001/A0000000003']}
renderNodeLabel={data => {
if (data.loading) {
return OrganisationUnitTreeControllable
Expand All @@ -78,16 +78,13 @@ export const CustomRequests = () => {

const formatted = {
...data,
node: {
...data.node,
displayName: (
<span>
{data.node.displayName}
{' '}
(mayApprove: {' '}{mayApprove.toString()})
</span>
)
}
label: (
<span>
{data.node.displayName}
{' '}
(mayApprove: {' '}{mayApprove.toString()})
</span>
)
}

return OrganisationUnitTreeControllable
Expand Down

0 comments on commit 4d8a042

Please sign in to comment.