File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import { geoContext } from './GEOContext';
27
27
import { layersControl } from './LayersControl' ;
28
28
// @ts -ignore
29
29
import Notification from 'ol-ext/control/Notification'
30
+ import { object } from 'prop-types' ;
30
31
31
32
/**
32
33
* Array of style configuration objects for styling the component.
@@ -568,6 +569,10 @@ GEOComp = withMethodExposing(GEOComp, [
568
569
name : "filter" ,
569
570
type : "JSONValue" ,
570
571
} ,
572
+ {
573
+ name : "merge" ,
574
+ type : "boolean" ,
575
+ } ,
571
576
]
572
577
} ,
573
578
execute : async ( comp : any , params : any ) => {
@@ -590,7 +595,11 @@ GEOComp = withMethodExposing(GEOComp, [
590
595
}
591
596
//Load the new values by dispatching them,
592
597
//First merging the current values with the new values
593
- comp . dispatch ( changeValueAction ( deepMerge ( comp . toJsonValue ( ) , data ) , true ) )
598
+ if ( params [ 2 ] == true ) {
599
+ comp . dispatch ( changeValueAction ( deepMerge ( comp . toJsonValue ( ) , data ) , true ) )
600
+ } else {
601
+ comp . dispatch ( changeValueAction ( Object . assign ( { } , ( comp . toJsonValue ( ) , data ) , true ) ) )
602
+ }
594
603
return true
595
604
} catch ( e ) {
596
605
console . error ( "Failed to parse config data" , e )
You can’t perform that action at this time.
0 commit comments