Skip to content

Commit

Permalink
Transform numbers in title
Browse files Browse the repository at this point in the history
Signed-off-by: Sandeep Kumawat <[email protected]>
  • Loading branch information
Sandeep Kumawat committed Sep 3, 2024
1 parent e5c98d6 commit 8add136
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions public/pages/Transforms/containers/Transforms/Transforms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,19 @@ export class Transforms extends MDSEnabledComponent<TransformProps, TransformSta
this.getTransforms = _.debounce(this.getTransforms, 500, { leading: true });
}

async updateBreadCrumbs() {
if (this.state.useUpdatedUX) {
this.context.chrome.setBreadcrumbs([
{ text: BREADCRUMBS.TRANSFORMS.text.concat(` (${this.state.transforms.length})`), href: BREADCRUMBS.TRANSFORMS.href },
]);
}
}

async componentDidMount() {
const breadCrumbs = this.state.useUpdatedUX ? [BREADCRUMBS.TRANSFORMS] : [BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.TRANSFORMS];
this.context.chrome.setBreadcrumbs(breadCrumbs);
await this.getTransforms();
this.updateBreadCrumbs();
}

async componentDidUpdate(prevProps: TransformProps, prevState: TransformState) {
Expand All @@ -112,6 +121,7 @@ export class Transforms extends MDSEnabledComponent<TransformProps, TransformSta
if (!_.isEqual(prevQuery, currQuery)) {
await this.getTransforms();
}
this.updateBreadCrumbs();
}

render() {
Expand Down

0 comments on commit 8add136

Please sign in to comment.