Skip to content

Commit

Permalink
Merge pull request #4997 from rldhont/lizmap-features-table-lower-cas…
Browse files Browse the repository at this point in the history
…e-attr-values

[Bugfix] <lizmap-features-table>: lower case sortingOrder and draggable attribute values
  • Loading branch information
rldhont authored Nov 21, 2024
2 parents c320a73 + 93f27a0 commit 78cd828
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 78cd828

Please sign in to comment.