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

Table filter not working #8273

Closed
cmyip opened this issue Sep 21, 2019 · 6 comments · Fixed by #9234
Closed

Table filter not working #8273

cmyip opened this issue Sep 21, 2019 · 6 comments · Fixed by #9234
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days .pinned Draws attention

Comments

@cmyip
Copy link

cmyip commented Sep 21, 2019

When "emit filter events" is checked for table, filter no longer works.

Expected results

Clicking on rows in table should emit filter event and other widgets should react to filter events

Actual results

Browser's console would log "Cannot read property 'columns' of undefined".

Screenshots

image

image

How to reproduce the bug

This assumes we are using superset with sample data

  1. Open "World's Bank Data" dashboard
  2. Select Explore Chart
    image
  3. Customize and select "Emit filter events"
    image
  4. Go back to "World's Bank Data", click first column on any rows, you should see Javascript console error

Environment

(please complete the following information):

  • superset version: 0.34.1
  • python version: 3.7.4
  • node.js version: 10.16.3
  • npm version: 6.10.3

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • [ y] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [ y] I have reproduced the issue with at least the latest released version of superset.
  • [ y] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@issue-label-bot issue-label-bot bot added the !deprecated-label:bug Deprecated label - Use #bug instead label Sep 21, 2019
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.95. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@cmyip
Copy link
Author

cmyip commented Sep 21, 2019

Same as issue apache-superset/superset-ui-plugins#125

@stale
Copy link

stale bot commented Nov 20, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@oscarostlundgs
Copy link

oscarostlundgs commented Feb 25, 2021

This still seems to be an issue in 1.0.1. The table filter functionality is very useful for interactive dashboards. Any chance we could reopen the issue?

I narrowed down the issue to the dashboardFilter reducer trying to update an undefined filter as the getInitialState function only creates an initial filter for filter_box and filter_select types. (See here)

I believe it may almost work out of the box by allowing for 'table' types in the if statement.

@villebro
Copy link
Member

This functionality is currently being actively worked on - please see #12662 for the new functionality that was recently added and is currently being implemented on the table chart (and other charts) to replace the old deprecated logic.

@oost oost mentioned this issue Feb 25, 2021
6 tasks
@oost
Copy link

oost commented Feb 25, 2021

OK Thanks. Will that functionality be in the next version of Superset?

If helps, I submitted a PR that fixes the issue with the current implementation. Basically just making sure dashboardFilters get an initial state for tables so when a changeFilter event is emitted, the dashboardFilter state for the chart can be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days .pinned Draws attention
Projects
None yet
5 participants