Skip to content

Commit

Permalink
[EuiDualRange] Fix incorrect onResize input popover logic
Browse files Browse the repository at this point in the history
- the `width` being passed is the total width of the popover, we want the range track only
  • Loading branch information
cee-chen committed Oct 23, 2023
1 parent 7ab3742 commit 1a9e09a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/form/range/dual_range.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,11 @@ export class EuiDualRangeClass extends Component<
};

onResize = (width: number) => {
this.setState({
rangeWidth: width,
});
if (this.rangeSliderRef) {
this.setState({
rangeWidth: this.rangeSliderRef.clientWidth,
});
}
this.props.inputPopoverProps?.onPanelResize?.(width);
};

Expand Down

0 comments on commit 1a9e09a

Please sign in to comment.