Skip to content

Commit

Permalink
fix(ExpandableSection): truncate variant shows toggle button if conte…
Browse files Browse the repository at this point in the history
…nt length changes (#9758)
  • Loading branch information
adamviktora authored Oct 27, 2023
1 parent 1eadbab commit e7b5818
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class ExpandableSection extends React.Component<ExpandableSectionProps, Expandab
componentDidUpdate(prevProps: ExpandableSectionProps) {
if (
this.props.variant === ExpandableSectionVariant.truncate &&
prevProps.truncateMaxLines !== this.props.truncateMaxLines
(prevProps.truncateMaxLines !== this.props.truncateMaxLines || prevProps.children !== this.props.children)
) {
const expandableContent = this.expandableContentRef.current;
setLineClamp(this.props.truncateMaxLines, expandableContent);
Expand Down

0 comments on commit e7b5818

Please sign in to comment.