prevent NumericSetting from accepting non-numeric inputs
This commit is contained in:
parent
741169d807
commit
33a5600a30
@ -10,11 +10,9 @@
|
||||
export let max = null;
|
||||
export let decimal = false;
|
||||
|
||||
console.log('min:', min);
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
let error = null;
|
||||
let localValue = value.toString();
|
||||
const dispatch = createEventDispatcher();
|
||||
function validate(event) {
|
||||
localValue = localValue.replace(/[^-0-9.]/g, '');
|
||||
// Don't update the value, but also don't error, if it's empty
|
||||
|
Loading…
x
Reference in New Issue
Block a user