We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a816ddd commit 18c140aCopy full SHA for 18c140a
packages/react-core/src/components/Chip/Chip.tsx
@@ -81,6 +81,17 @@ class Chip extends React.Component<ChipProps, ChipState> {
81
});
82
}
83
84
+ componentDidUpdate(_prevProps: ChipProps, prevState: ChipState) {
85
+ const nextIsTooltipVisible = Boolean(
86
+ this.span.current && this.span.current.offsetWidth < this.span.current.scrollWidth
87
+ );
88
+ if (prevState.isTooltipVisible !== nextIsTooltipVisible) {
89
+ this.setState({
90
+ isTooltipVisible: nextIsTooltipVisible
91
+ });
92
+ }
93
94
+
95
setChipStyle = () => ({
96
[cssChipTextMaxWidth.name]: this.props.textMaxWidth
97
0 commit comments