Skip to content

Commit 6cb3ab0

Browse files
committed
Use ResizeDetector to fix date pickers autosize width in hidden containers
1 parent a43bf9e commit 6cb3ab0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

components/dash-core-components/src/fragments/DatePickerRange.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ const DatePickerRange = ({
136136
endAutosizeRef.current?.updateInputWidth?.();
137137
}, []);
138138

139+
useEffect(() => {
140+
startAutosizeRef.current?.updateInputWidth?.();
141+
}, [startInputValue]);
142+
143+
useEffect(() => {
144+
endAutosizeRef.current?.updateInputWidth?.();
145+
}, [endInputValue]);
139146

140147
useEffect(() => {
141148
// Controls when setProps is called. Basically, whenever internal state

0 commit comments

Comments
 (0)