palantir/blueprint

NumericInput - prevent exceeding min or max when typing or pasting values

Open

#2.071 geöffnet am 2. Feb. 2018

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (20.263 Stars) (2.167 Forks)batch import
Package: coreType: enhancementhelp wanted

Beschreibung

Current NumericInput implementation caps properly at bounds when using the mouse, but when one types or pastes a value, the input should prevent typing a value exceeding the limits, it currently does not and users can type garbage.

One way to prevent this is, until a solution appears, is to check again the bounds in the onValueChange event, but is redundant.

Contributor Guide