Skip to content

Commit

Permalink
geosolutions-it#9216: handle fixing not visibility of spatial filter …
Browse files Browse the repository at this point in the history
…for widgets that created by the attr table
  • Loading branch information
mahmoudadel54 committed Oct 30, 2023
1 parent 99c69da commit 49dc51d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions web/client/epics/__tests__/widgetsbuilder-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ describe('widgetsbuilder epic', () => {
});
it('handleWidgetsFilterPanel', (done) => {
const startActions = [openFilterEditor()];
testEpic(handleWidgetsFilterPanel, 4, startActions, actions => {
expect(actions.length).toBe(4);
testEpic(handleWidgetsFilterPanel, 3, startActions, actions => {
expect(actions.length).toBe(3);
actions.map((action) => {
switch (action.type) {
case SET_CONTROL_PROPERTY:
Expand Down
8 changes: 0 additions & 8 deletions web/client/epics/widgetsbuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,9 @@ import { QUERY_FORM_SEARCH, loadFilter } from '../actions/queryform';
import { setControlProperty, TOGGLE_CONTROL } from '../actions/controls';
import { ADD_LAYER } from '../actions/layers';
import { LOCATION_CHANGE } from 'connected-react-router';
import { featureTypeSelected } from '../actions/wfsquery';
import { getWidgetLayer, getEditingWidgetFilter, getWidgetFilterKey } from '../selectors/widgets';
import { wfsFilter } from '../selectors/query';
import { widgetBuilderAvailable } from '../selectors/controls';
const getFTSelectedArgs = (state) => {
let layer = getWidgetLayer(state);
let url = layer.search && layer.search.url;
let typeName = layer.name;
return [url, typeName, layer.fields];
};

export const openWidgetEditor = (action$, {getState = () => {}} = {}) => action$.ofType(NEW, EDIT, NEW_CHART)
.filter(() => widgetBuilderAvailable(getState()))
Expand Down Expand Up @@ -91,7 +84,6 @@ export const handleWidgetsFilterPanel = (action$, {getState = () => {}} = {}) =>
.switchMap(() =>
// open and setup query form
Rx.Observable.of(
featureTypeSelected(...getFTSelectedArgs(getState())),
loadFilter(getEditingWidgetFilter(getState())),
setControlProperty("widgetBuilder", "enabled", false),
setControlProperty('queryPanel', "enabled", true)
Expand Down

0 comments on commit 49dc51d

Please sign in to comment.