Skip to content

Commit bc2719e

Browse files
authored
Merge branch 'dev' into fix-multi-select-dropdown-with-components-as-labels
2 parents c634cf5 + 343c8c4 commit bc2719e

File tree

11 files changed

+616
-31
lines changed

11 files changed

+616
-31
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These owners will be the default owners for everything in
22
# the repo. Unless a later match takes precedence
3-
* @T4rk1n @ndrezn @emilykl @camdecoster
3+
* @T4rk1n @ndrezn @camdecoster

.github/dependabot.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
version: 2
2+
updates:
3+
# Root package dependencies
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
groups:
10+
npm-dependencies:
11+
patterns:
12+
- "*"
13+
ignore:
14+
# Ignore @plotly packages
15+
- dependency-name: "@plotly/*"
16+
17+
# Dash renderer
18+
- package-ecosystem: "npm"
19+
directory: "/dash/dash-renderer"
20+
schedule:
21+
interval: "weekly"
22+
day: "monday"
23+
groups:
24+
npm-dependencies:
25+
patterns:
26+
- "*"
27+
28+
# Components - dash-core-components
29+
- package-ecosystem: "npm"
30+
directory: "/components/dash-core-components"
31+
schedule:
32+
interval: "weekly"
33+
day: "monday"
34+
groups:
35+
npm-dependencies:
36+
patterns:
37+
- "*"
38+
39+
# Components - dash-html-components
40+
- package-ecosystem: "npm"
41+
directory: "/components/dash-html-components"
42+
schedule:
43+
interval: "weekly"
44+
day: "monday"
45+
groups:
46+
npm-dependencies:
47+
patterns:
48+
- "*"
49+
50+
# Components - dash-table
51+
- package-ecosystem: "npm"
52+
directory: "/components/dash-table"
53+
schedule:
54+
interval: "weekly"
55+
day: "monday"
56+
groups:
57+
npm-dependencies:
58+
patterns:
59+
- "*"
60+
61+
# Python dependencies
62+
- package-ecosystem: "pip"
63+
directory: "/"
64+
schedule:
65+
interval: "weekly"
66+
day: "monday"
67+
groups:
68+
pip-dependencies:
69+
patterns:
70+
- "*"

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
All notable changes to `dash` will be documented in this file.
33
This project adheres to [Semantic Versioning](https://semver.org/).
44

5+
## [UNRELEASED]
6+
7+
## Added
8+
- [#3637](https://github.com/plotly/dash/pull/3637) Added `debounce` prop to `Dropdown`.
9+
10+
## Fixed
11+
- [#3629](https://github.com/plotly/dash/pull/3629) Fix date pickers not showing date when initially rendered in a hidden container.
12+
- [#3627][(](https://github.com/plotly/dash/pull/3627)) Make dropdowns searchable wheen focused, without requiring to open them first
13+
14+
15+
516
## [4.0.0] - 2026-02-03
617

718
## Added

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
strAsDate,
2121
} from '../utils/calendar/helpers';
2222
import {captureCSSForPortal} from '../utils/calendar/cssVariables';
23+
import ResizeDetector from '../utils/ResizeDetector';
2324
import '../components/css/datepickers.css';
2425

2526
const DatePickerRange = ({
@@ -104,6 +105,8 @@ const DatePickerRange = ({
104105
const containerRef = useRef<HTMLDivElement>(null);
105106
const startInputRef = useRef<HTMLInputElement | null>(null);
106107
const endInputRef = useRef<HTMLInputElement | null>(null);
108+
const startAutosizeRef = useRef<any>(null);
109+
const endAutosizeRef = useRef<any>(null);
107110
const calendarRef = useRef<CalendarHandle>(null);
108111
const hasPortal = with_portal || with_full_screen_portal;
109112

@@ -128,6 +131,19 @@ const DatePickerRange = ({
128131
setEndInputValue(formatDate(internalEndDate, display_format));
129132
}, [internalEndDate, display_format]);
130133

134+
const handleResize = useCallback(() => {
135+
startAutosizeRef.current?.updateInputWidth?.();
136+
endAutosizeRef.current?.updateInputWidth?.();
137+
}, []);
138+
139+
useEffect(() => {
140+
startAutosizeRef.current?.updateInputWidth?.();
141+
}, [startInputValue]);
142+
143+
useEffect(() => {
144+
endAutosizeRef.current?.updateInputWidth?.();
145+
}, [endInputValue]);
146+
131147
useEffect(() => {
132148
// Controls when setProps is called. Basically, whenever internal state
133149
// diverges from props (i.e., user interaction)
@@ -313,6 +329,10 @@ const DatePickerRange = ({
313329
);
314330

315331
return (
332+
<ResizeDetector
333+
onResize={handleResize}
334+
targets={[containerRef]}
335+
>
316336
<div className="dash-datepicker" ref={containerRef}>
317337
<Popover.Root
318338
open={!disabled && isCalendarOpen}
@@ -335,6 +355,7 @@ const DatePickerRange = ({
335355
}}
336356
>
337357
<AutosizeInput
358+
ref={startAutosizeRef}
338359
inputRef={node => {
339360
startInputRef.current = node;
340361
}}
@@ -356,6 +377,7 @@ const DatePickerRange = ({
356377
/>
357378
<ArrowIcon className="dash-datepicker-range-arrow" />
358379
<AutosizeInput
380+
ref={endAutosizeRef}
359381
inputRef={node => {
360382
endInputRef.current = node;
361383
}}
@@ -458,6 +480,7 @@ const DatePickerRange = ({
458480
</Popover.Portal>
459481
</Popover.Root>
460482
</div>
483+
</ResizeDetector>
461484
);
462485
};
463486

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
strAsDate,
1515
} from '../utils/calendar/helpers';
1616
import {captureCSSForPortal} from '../utils/calendar/cssVariables';
17+
import ResizeDetector from '../utils/ResizeDetector';
1718
import '../components/css/datepickers.css';
1819

1920
const DatePickerSingle = ({
@@ -63,6 +64,7 @@ const DatePickerSingle = ({
6364

6465
const containerRef = useRef<HTMLDivElement>(null);
6566
const inputRef = useRef<HTMLInputElement | null>(null);
67+
const autosizeRef = useRef<any>(null);
6668
const calendarRef = useRef<CalendarHandle>(null);
6769
const hasPortal = with_portal || with_full_screen_portal;
6870

@@ -87,6 +89,15 @@ const DatePickerSingle = ({
8789
}
8890
}, [internalDate]);
8991

92+
const handleResize = useCallback(() => {
93+
autosizeRef.current?.updateInputWidth?.();
94+
}, []);
95+
96+
97+
useEffect(() => {
98+
autosizeRef.current?.updateInputWidth?.();
99+
}, [inputValue]);
100+
90101
const parseUserInput = useCallback(
91102
(focusCalendar = false) => {
92103
if (inputValue === '') {
@@ -157,6 +168,7 @@ const DatePickerSingle = ({
157168
}
158169

159170
return (
171+
<ResizeDetector onResize={handleResize} targets={[containerRef]}>
160172
<div className="dash-datepicker" ref={containerRef}>
161173
<Popover.Root
162174
open={!disabled && isCalendarOpen}
@@ -179,6 +191,7 @@ const DatePickerSingle = ({
179191
}}
180192
>
181193
<AutosizeInput
194+
ref={autosizeRef}
182195
inputRef={node => {
183196
inputRef.current = node;
184197
}}
@@ -274,6 +287,7 @@ const DatePickerSingle = ({
274287
</Popover.Portal>
275288
</Popover.Root>
276289
</div>
290+
</ResizeDetector>
277291
);
278292
};
279293

0 commit comments

Comments
 (0)