@eeacms/volto-arcgis-block 0.1.180 → 0.1.181

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [0.1.181](https://github.com/eea/volto-arcgis-block/compare/0.1.180...0.1.181) - 28 July 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - CLMS-2422 (bug): year filter selectins persists past layer changes if as long as selected region exists in new layer options. Code refactored and cleaned. [ujbolivar - [`3aca73f`](https://github.com/eea/volto-arcgis-block/commit/3aca73f1485d54248523a6f5525dcfbe18473620)]
7
12
  ### [0.1.180](https://github.com/eea/volto-arcgis-block/compare/0.1.179...0.1.180) - 26 July 2023
8
13
 
9
14
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.180",
3
+ "version": "0.1.181",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -599,21 +599,19 @@ class HotspotWidget extends React.Component {
599
599
  selectBox.options.add(new Option(option, option, option));
600
600
  }
601
601
  for (let u = 0; u < selectBox.options.length; u++) {
602
- if (selectBox.options[u].label.includes(this.selectedArea)) {
602
+ if (!selectBox.options[u].label.includes(this.selectedArea)) {
603
+ selectBox.value = 'default';
604
+ continue;
605
+ } else {
603
606
  selectBox.value = this.selectedArea;
604
- if (this.lcYear === null) selectBoxLcTime.value = 'default';
605
- else if (this.lccYear === null)
606
- selectBoxLccTime.value = 'default';
607
- else {
607
+ if (this.lcYear !== null) {
608
608
  selectBoxLcTime.value = this.lcYear;
609
+ }
610
+ if (this.lccYear !== null) {
609
611
  selectBoxLccTime.value = this.lccYear;
610
612
  }
611
- break;
612
- } else {
613
- selectBox.value = 'default';
614
- selectBoxLcTime.value = 'default';
615
- selectBoxLccTime.value = 'default';
616
613
  }
614
+ break;
617
615
  }
618
616
  break;
619
617
  } else if (
@@ -625,24 +623,23 @@ class HotspotWidget extends React.Component {
625
623
  selectBox.options.add(new Option(option, option, option));
626
624
  }
627
625
  for (let u = 0; u < selectBox.options.length; u++) {
628
- if (selectBox.options[u].label.includes(this.selectedArea)) {
626
+ if (!selectBox.options[u].label.includes(this.selectedArea)) {
627
+ selectBox.value = 'default';
628
+ continue;
629
+ } else {
629
630
  selectBox.value = this.selectedArea;
630
- if (this.lcYear === null) selectBoxLcTime.value = 'default';
631
- else if (this.lccYear === null)
632
- selectBoxLccTime.value = 'default';
633
- else {
631
+ if (this.lcYear !== null) {
634
632
  selectBoxLcTime.value = this.lcYear;
633
+ }
634
+ if (this.lccYear !== null) {
635
635
  selectBoxLccTime.value = this.lccYear;
636
636
  }
637
- break;
638
- } else {
639
- selectBox.value = 'default';
640
- selectBoxLcTime.value = 'default';
641
- selectBoxLccTime.value = 'default';
642
637
  }
638
+ break;
643
639
  }
644
640
  break;
645
641
  }
642
+ break;
646
643
  }
647
644
  }
648
645
  if (selectBox.value === 'default') {