diff --git a/aurelia-slickgrid/src/aurelia-slickgrid/editors/floatEditor.ts b/aurelia-slickgrid/src/aurelia-slickgrid/editors/floatEditor.ts index c5e4643d1..45959b854 100644 --- a/aurelia-slickgrid/src/aurelia-slickgrid/editors/floatEditor.ts +++ b/aurelia-slickgrid/src/aurelia-slickgrid/editors/floatEditor.ts @@ -162,7 +162,7 @@ export class FloatEditor implements Editor { valid: false, msg: errorMsg || Constants.VALIDATION_EDITOR_NUMBER_MAX.replace(/{{maxValue}}/gi, (matched) => mapValidation[matched]) }; - } else if ((decPlaces > 0 && !new RegExp(`^(\\d+(\\.)?(\\d){0,${decPlaces}})$`).test(elmValue))) { + } else if ((decPlaces > 0 && !new RegExp(`^(\\d*(\\.)?(\\d){0,${decPlaces}})$`).test(elmValue))) { // when decimal value is bigger than 0, we only accept the decimal values as that value set // for example if we set decimalPlaces to 2, we will only accept numbers between 0 and 2 decimals return { diff --git a/aurelia-slickgrid/src/examples/slickgrid/example3.ts b/aurelia-slickgrid/src/examples/slickgrid/example3.ts index fe46d8f72..b9df0d941 100644 --- a/aurelia-slickgrid/src/examples/slickgrid/example3.ts +++ b/aurelia-slickgrid/src/examples/slickgrid/example3.ts @@ -161,6 +161,7 @@ export class Example3 { name: 'Duration (days)', field: 'duration', filterable: true, + minWidth: 100, sortable: true, type: FieldType.number, filter: { model: Filters.slider, params: { hideSliderNumber: false } }, @@ -182,7 +183,6 @@ export class Example3 { params: { decimalPlaces: 2 }, }, */ - minWidth: 100 }, { id: 'complete', name: '% Complete',