From d3b799eaa57c3d0e2fc5e0946c5347cf109fc56b Mon Sep 17 00:00:00 2001 From: Yusuke Nemoto Date: Thu, 15 Feb 2024 19:50:39 +0900 Subject: [PATCH] [MM-52171] webapp: Make rhs_card reloading when card body is changed (#23612) --- .../rhs_card/__snapshots__/rhs_card.test.tsx.snap | 12 +++++++++--- webapp/channels/src/components/rhs_card/rhs_card.tsx | 6 +++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/webapp/channels/src/components/rhs_card/__snapshots__/rhs_card.test.tsx.snap b/webapp/channels/src/components/rhs_card/__snapshots__/rhs_card.test.tsx.snap index 1cb350cf18..4b5df65c6b 100644 --- a/webapp/channels/src/components/rhs_card/__snapshots__/rhs_card.test.tsx.snap +++ b/webapp/channels/src/components/rhs_card/__snapshots__/rhs_card.test.tsx.snap @@ -31,7 +31,9 @@ exports[`comoponents/rhs_card/RhsCard should match on post when no plugin defini
- +
- +
- +
{ } shouldComponentUpdate(nextProps: Props, nextState: State) { + if (!deepEqual(nextProps.selected?.props?.card, this.props.selected?.props?.card)) { + return true; + } if (nextState.isScrolling !== this.state.isScrolling) { return true; } @@ -124,7 +128,7 @@ export default class RhsCard extends React.Component { if (!content) { content = (
- +
); }