diff --git a/components/organisation-unit-tree/src/__stories__/custom-node-label.js b/components/organisation-unit-tree/src/__stories__/custom-node-label.js
index 6f6f06c42f..b5d3680d64 100644
--- a/components/organisation-unit-tree/src/__stories__/custom-node-label.js
+++ b/components/organisation-unit-tree/src/__stories__/custom-node-label.js
@@ -13,10 +13,7 @@ export const CustomNodeLabel = () => (
return OrganisationUnitTree.defaultProps.renderNodeLabel({
...data,
- node: {
- ...data.node,
- displayName: --- {data.node.displayName},
- },
+ label: --- {data.node.displayName},
})
}}
/>
diff --git a/components/organisation-unit-tree/src/__stories__/custom-requests.js b/components/organisation-unit-tree/src/__stories__/custom-requests.js
index 57d05761b6..5be59141ab 100644
--- a/components/organisation-unit-tree/src/__stories__/custom-requests.js
+++ b/components/organisation-unit-tree/src/__stories__/custom-requests.js
@@ -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
@@ -78,16 +78,13 @@ export const CustomRequests = () => {
const formatted = {
...data,
- node: {
- ...data.node,
- displayName: (
-
- {data.node.displayName}
- {' '}
- (mayApprove: {' '}{mayApprove.toString()})
-
- )
- }
+ label: (
+
+ {data.node.displayName}
+ {' '}
+ (mayApprove: {' '}{mayApprove.toString()})
+
+ )
}
return OrganisationUnitTreeControllable