Skip to content

dcc.Input(type="number", min=...) erases value on spinner step (regression of #3689) #3921

Description

@ndrezn

Setting min on a number dcc.Input makes the native spinner (or arrow keys) erase the value — it gets cast to None. This is the same symptom as #3689, which was fixed and closed, but it reproduces again on dash 4.4.1.

Reproduction

from dash import Dash, dcc, html

app = Dash()
app.layout = html.Div([
    dcc.Input(type="number", value=40, min=0),    # spinner/arrows blank the value
    dcc.Input(type="number", value=40, step=1),    # works fine
])

if __name__ == "__main__":
    app.run(debug=True)

Click the up/down spinner (or focus + arrow keys) on the first input → the value clears. The second input is unaffected.

Notes

  • Only min triggers it; step and max alone are fine.
  • Browser/spinner-dependent — did not reproduce in headless Chromium.

Environment

  • dash 4.4.1, Python 3.12

Metadata

Metadata

Assignees

Labels

P1needed for current cyclebugsomething brokensize: 1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions