From 93f27a05aa54e8a3323d2db192679dca95b4c0ac Mon Sep 17 00:00:00 2001 From: rldhont Date: Wed, 20 Nov 2024 21:54:32 +0100 Subject: [PATCH] [Bugfix] : lower case sortingOrder and draggable attribute values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sortingOrder and draggable attribute values has not to be case sensitive. Funded Haute-Saone Numérique --- assets/src/components/FeaturesTable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/src/components/FeaturesTable.js b/assets/src/components/FeaturesTable.js index 546094de62..561ecec219 100644 --- a/assets/src/components/FeaturesTable.js +++ b/assets/src/components/FeaturesTable.js @@ -53,14 +53,14 @@ export default class FeaturesTable extends HTMLElement { // Sorting attribute and direction this.sortingField = this.getAttribute('sortingField'); const sortingOrder = this.getAttribute('sortingOrder'); - this.sortingOrder = (sortingOrder !== null && ['asc', 'desc'].includes(sortingOrder)) ? sortingOrder : 'asc'; + this.sortingOrder = (sortingOrder !== null && ['asc', 'desc'].includes(sortingOrder.toLowerCase())) ? sortingOrder : 'asc'; // open popup ? this.openPopup = (this.layerConfig && this.layerConfig.popup); // Add drag&drop capability ? const draggable = this.getAttribute('draggable'); - this.itemsDraggable = (draggable !== null && ['yes', 'no'].includes(draggable)) ? draggable : 'no'; + this.itemsDraggable = (draggable !== null && ['yes', 'no'].includes(draggable.toLowerCase())) ? draggable : 'no'; // Features this.features = [];