Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).

### Fixed
- [#3916](https://github.com/plotly/dash/pull/3916) Fixed a regression where dragging multiple files into `dcc.Upload` would upload only the first file when `multiple=True`
- [#3922](https://github.com/plotly/dash/pull/3922) Fix `dcc.Input(type="number")` stepper behavior when only `min` is set.

## [4.4.1] - 2026-07-21

Expand Down
6 changes: 3 additions & 3 deletions components/dash-core-components/src/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function Input({
setValue(value);
}, []);

const onKeyPress: KeyboardEventHandler<HTMLInputElement> = useCallback(
const onKeyDown: KeyboardEventHandler<HTMLInputElement> = useCallback(
(e: KeyboardEvent) => {
if (e.key === 'Enter') {
props.setProps({
Expand Down Expand Up @@ -194,7 +194,7 @@ function Input({
parseFloat(props.min as string)
);
}
if (props.max !== null && props.min !== undefined) {
if (props.max !== null && props.max !== undefined) {
constrainedValue = Math.min(
constrainedValue,
parseFloat(props.max as string)
Expand Down Expand Up @@ -288,7 +288,7 @@ function Input({
className="dash-input-element"
onBlur={onBlur}
onChange={onChange}
onKeyPress={onKeyPress}
onKeyDown={onKeyDown}
{...valprops}
{...pickedInputs}
{...loadingProps}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,14 @@ def test_inni010_valid_numbers(dash_dcc, ninput_app):
assert dash_dcc.get_logs() == []


def test_inni011_min_max_bug(dash_dcc):
"""Test that decrement increment button works correctly with min/max set to None."""
@pytest.mark.parametrize("min", [None, 0, 1])
def test_inni011_min_max_bug(dash_dcc, min):
"""Test that decrement increment button works correctly with min/max set to None or only min is set."""

app = Dash(__name__)
app.layout = html.Div(
[
dcc.Input(id="number", value=17, type="number", min=None, max=None),
dcc.Input(id="number", value=17, type="number", min=min, max=None),
html.Div(id="output"),
]
)
Expand Down
Loading