vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.64k stars 6.95k forks source link

[Feature Request] v-number-input needs a control-variant with no increment/decrement buttons or have hide-spin-buttons actually work #20272

Open WarpedPixel opened 1 month ago

WarpedPixel commented 1 month ago

Problem to solve

A number input that actually restricts inputs to numbers on all browsers and platforms

Proposed solution

A v-input-control with the following inside it is pretty close to the desired feature (except for the vertical separator line controlled by inset which still shows):

<v-number-input reverse control-variant="stacked">
                        <template v-slot:increment></template>
                        <template v-slot:decrement></template>
                    </v-number-input>
yuwu9145 commented 1 month ago

@WarpedPixel Are you suggesting to hide -/+ buttons or have number restriction removed? Or both?

WarpedPixel commented 1 month ago

Hide the buttons and the additional chrome (a divider it looks like), but still restricted to numbers and popping the best soft keyboard for numbers on each platform. Handling (or rejecting) decimals or integers only or negative numbers would be nice but not critical. The sample code almost works.

dcrystalj commented 3 weeks ago

Imo type ControlVariant = 'default' | 'stacked' | 'split' is also missing 'none' variant