mui-toolpad icon indicating copy to clipboard operation
mui-toolpad copied to clipboard

Set minimum and maximum value for component number attributes

Open apedroferreira opened this issue 3 years ago • 2 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Summary 💡

Right now, for component properties that have a number value, any integer value can be set, including negative numbers. For some for these attributes, we want there to be a minimum and maximum value that can be set. This will make it less likely for the layout to break, or any other unintended behaviors to happen.

Examples 🌈

No response

Motivation 🔦

No response

apedroferreira avatar May 24 '22 12:05 apedroferreira

Is it related to all or some particular components? Where do we show 'component number attributes'?

prakhargupta1 avatar Aug 17 '22 20:08 prakhargupta1

Is it related to all or some particular components? Where do we show 'component number attributes'?

It could help in any UI controls for components that use numbers, even new custom components - for example if a row has a giant gap value like 9999 it would probably break the layout pretty bad. This probably isn't high priority for now as we don't have that many cases/components where something like this can have bad consequences?

Screen Shot 2022-08-18 at 16 36 38 Screen Shot 2022-08-18 at 16 36 49

apedroferreira avatar Aug 18 '22 15:08 apedroferreira