From fff60a960e15d53d9920fa318a58e30becebddb2 Mon Sep 17 00:00:00 2001 From: rldhont Date: Fri, 4 Jul 2025 08:02:00 +0200 Subject: [PATCH] lizmap-features-table: Display a message when no features found lizmap-features-table always displayed a table even if it is empty. We propose to display a message when the table is empty and an optional attribut has been added to be able to defined a message to display. Funded by CA Grand Narbonne --- assets/src/components/FeaturesTable.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/assets/src/components/FeaturesTable.js b/assets/src/components/FeaturesTable.js index c488d02c71..1a391f1299 100644 --- a/assets/src/components/FeaturesTable.js +++ b/assets/src/components/FeaturesTable.js @@ -35,6 +35,7 @@ import GeoJSON from 'ol/format/GeoJSON.js'; * (optional) data-center-to-highlighted-feature-geometry="true" * (optional) data-max-features="100" * (optional) data-active-item-feature-id="5" + * (optional) data-empty-message="No features found" * > * html`

${this.layerTitle}

+ ${this.features.length > 0 ? html`
`;