Skip to content

Widget for a number field get a string as value #5241

Description

@sthenault

Prerequisites

What theme are you using?

mui

Version

6.8

Current Behavior

We've a custom widget for a number field which breaks since 6.8 because its value prop is given as a string instead of a number as it was up to 6.7.

It appears this occurs on browser with eg. french locale setup (actually language with decimal separator != '.')

Expected Behavior

get value as a number as before.

Steps To Reproduce

  • define a custom widget for some number field
  • setup your browser's locale to "french"
  • check the type of the value prop given to your widget

Environment

- OS: debian trixie
- Node: 24.20
- npm: 11.19

Anything else?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions