From 0741d2a943c34474fc012735a571ed29d2f04b59 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 8 May 2024 18:40:40 +0200 Subject: [PATCH] wip: add min/max attributes to minmax filters inputs --- umap/static/umap/js/umap.forms.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index 3bb0e5df..1e27898f 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -822,6 +822,8 @@ L.FormBuilder.MinMaxBase = L.FormBuilder.FacetSearchBase.extend({ this.minInput = L.DomUtil.create('input', '', this.minLabel) this.minInput.type = this.inputType this.minInput.step = 'any' + this.minInput.min = this.prepareForHTML(min) + this.minInput.max = this.prepareForHTML(max) if (min != null) { this.minInput.dataset.value = min // Use setAttribute so to restore to this value when resetting @@ -836,6 +838,8 @@ L.FormBuilder.MinMaxBase = L.FormBuilder.FacetSearchBase.extend({ this.maxInput = L.DomUtil.create('input', '', this.maxLabel) this.maxInput.type = this.inputType this.maxInput.step = 'any' + this.maxInput.min = this.prepareForHTML(min) + this.maxInput.max = this.prepareForHTML(max) if (max != null) { this.maxInput.dataset.value = max this.maxInput.setAttribute('value', this.prepareForHTML(max))