Skip to content

Commit

Permalink
[Bugfix] <lizmap-features-table>: lower case sortingOrder and draggab…
Browse files Browse the repository at this point in the history
…le attribute values

The sortingOrder and draggable attribute values has not to be case sensitive.

Funded Haute-Saone Numérique
  • Loading branch information
rldhont authored and github-actions[bot] committed Nov 21, 2024
1 parent 9094b08 commit 7e28f2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/src/components/FeaturesTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down

0 comments on commit 7e28f2e

Please sign in to comment.