Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Maps] Problem on Edit Filter #64485

Closed
flaviogoncalves opened this issue Apr 25, 2020 · 3 comments · Fixed by #64586
Closed

[Maps] Problem on Edit Filter #64485

flaviogoncalves opened this issue Apr 25, 2020 · 3 comments · Fixed by #64586
Assignees
Labels
bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation

Comments

@flaviogoncalves
Copy link

Describe the feature:

Elasticsearch version (bin/elasticsearch --version):

7.6.2

JVM version (java -version):

Cloud

OS version (uname -a if on a Unix-like system):

Cloud

Description of the problem including expected versus actual behavior:

In the map, when you click over a city, you can select filters. After selecting a filter, if you try to edit the filter it does not save or apply the new filter.

Steps to reproduce:

1 - Open a map
2 - Have a tooltip associated with any polygon
3- Click in the polygon
4 - Select the filter based on the + symbol of the tooltip

Now try to edit and save the filter created

Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.

Provide logs (if relevant):

@jasontedor jasontedor transferred this issue from elastic/elasticsearch Apr 26, 2020
@nreese nreese added bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation labels Apr 26, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@thomasneirynck thomasneirynck changed the title Problem on Edit Filter [Maps] Problem on Edit Filter Apr 27, 2020
@thomasneirynck
Copy link
Contributor

thomasneirynck commented Apr 27, 2020

thx @flaviogoncalves I can reproduce as described. Will ping back here with updates.

@nreese
Copy link
Contributor

nreese commented Apr 27, 2020

Started to investigate this. It looks like the filters created from maps are not properly setting $state.

Filters created in filter bar UI set $state':(store:appState)
Filters created from Maps app set '$state':appState.

Then in the filter_editor on Submit handler, $state without store just returns early.
https://github.com/elastic/kibana/blob/7.7/src/plugins/data/public/ui/filter_bar/filter_editor/index.tsx#L471

private onSubmit = () => {
    const {
      selectedIndexPattern: indexPattern,
      selectedField: field,
      selectedOperator: operator,
      params,
      useCustomLabel,
      customLabel,
      isCustomEditorOpen,
      queryDsl,
    } = this.state;

    const { $state } = this.props.filter;
    if (!$state || !$state.store) {
      return; // typescript validation
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants