File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/components/attributeTable Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ export default {
88
88
// unregister event after table is closed
89
89
this .layer .getSource ().un (' change' , this .prepareTableDataAndColumns );
90
90
}
91
+
92
+ if (this .syncTableMapSelection ) {
93
+ this .deactivateSelectRowOnMapClick ();
94
+ }
91
95
},
92
96
watch: {
93
97
layerId () {
@@ -172,6 +176,14 @@ export default {
172
176
});
173
177
},
174
178
179
+ /**
180
+ * Deactivate behaviour that a selected feature on the
181
+ * map will be selected in the AttributeTable as well.
182
+ */
183
+ deactivateSelectRowOnMapClick () {
184
+ WguEventBus .$off (' map-selectionchange' );
185
+ },
186
+
175
187
/**
176
188
* Highlight row matching the feature ID
177
189
* and set correct page of the table.
@@ -247,6 +259,11 @@ export default {
247
259
return ;
248
260
}
249
261
262
+ // unregister change event on previous layer source if any
263
+ if (this .layer ) {
264
+ this .layer .getSource ().un (' change' , this .prepareTableDataAndColumns );
265
+ }
266
+
250
267
// reset table properties
251
268
this .records = [];
252
269
this .features = [];
You can’t perform that action at this time.
0 commit comments