superset icon indicating copy to clipboard operation
superset copied to clipboard

"Relation as Many" filter display is broken

Open bowoojangIDK opened this issue 1 year ago • 1 comments

Bug description

To reproduce: This happens when using the "Relation as Many" filter

  1. Go to '..'
    • case1: Setting > List Users > Filter list: role > "Relation as Many" filter
    • case2: Setting > List Roles > Filter list: permission > "Relation as Many" filter
  2. Select multiple options to search
  3. Click on 'refresh(search)' button.
  4. See error

Expected Behavior: Only the items matching the selected permission filter should be displayed.

Actual Behavior: The entire list is displayed along with the selected option.

Screenshots/recordings

To reproduce: select multiple options and click 'refresh' button here. Screenshot 2024-10-17 at 3 33 25 PM

AS-IS Behavior: Screenshot 2024-10-17 at 3 29 04 PM

Expected Behavior: Screenshot 2024-10-17 at 3 31 07 PM

Superset version

3.1.3

Python version

3.11

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

bowoojangIDK avatar Oct 17 '24 06:10 bowoojangIDK

@bowoojangIDK Hello there! I'm here to help you with your Superset issue. I can assist you in solving bugs, answering questions, and becoming a contributor. Let's work together to resolve your issue.

The issue you're experiencing with the "Relation as Many" filter not displaying the expected filtered results might be related to how the filtering logic interacts with the user interface components. The filtering logic in Superset involves a combination of hooks, state management, and rendering logic to manage the state and behavior of filters in the dashboard [1][2].

Here are a few things you might want to check or consider:

  1. State Management: Ensure that the state of the filter is being correctly updated when you select multiple options. The FilterValue component manages states like isLoading and formData, which are crucial for the correct functioning of filters [1].

  2. Data Fetching and UI Rendering: Verify that the data fetching logic is correctly fetching the filtered data based on the selected options. The getChartDataRequest function is used to fetch data, and the SuperChart component renders the UI based on this data [1].

  3. Event Handling: Check if the event handling logic for the 'refresh(search)' button is correctly triggering the filtering logic. This involves ensuring that the correct hooks are being used to manage user interactions [1].

  4. Error Handling: Look for any error messages that might be displayed when the filter is applied. This can provide clues about what might be going wrong [1].

If these areas seem to be functioning correctly, there might be a deeper issue with how the "Relation as Many" filter is implemented or integrated. Since I couldn't find specific details about this filter in the codebase, it might be helpful to review the implementation details or any recent changes that could have affected its behavior.

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Oct 17 '24 06:10 dosubot[bot]

Thanks for reporting this issue! It's still there in latest Superset version atm.

I found this error stemming from one of Superset's primary dependencies, flask-app-builder so it could gonna be a bit back-and-forth until RC found, fixed and present in Superset

hainenber avatar Feb 21 '25 12:02 hainenber

Pinging @dpgaspar as the core maintainer/author of FAB :)

rusackas avatar Feb 21 '25 19:02 rusackas

This is no longer relevant in the current React-based roles/users views, so I'll close it out.

rusackas avatar May 30 '25 05:05 rusackas

@rusackas Hi, when you say "the current", does it mean version 4.1.2. ? https://github.com/apache/superset/releases/tag/4.1.2

bowoojangIDK avatar May 30 '25 05:05 bowoojangIDK