extensions-api icon indicating copy to clipboard operation
extensions-api copied to clipboard

Listener for Dashboard Action Filter Behaves Differently to Quick Filter

Open craigbloodworth opened this issue 7 years ago • 1 comments

I've got a 'filter-changed' listener setup on a sheet. That sheet is controlled by a dashboard action with an 'Exclude all values' select filter.

When a dimensional value is selected the getSummaryDataAsync() function called by the filter changed listener behaves as expected, i.e. the selected values are returned.

When the marks are deselected, however, and the filter changed listener fires the getSummaryDataAsync() returns the same dataset as it did before, not an empty one.

If you put that same action filter on the dashboard as a quick filter and deselect all the values the summary data returned is empty.

2018-07-10_14-35-15

craigbloodworth avatar Jul 10 '18 13:07 craigbloodworth

Hi Craig:

I believe things are working correctly, but there are two filter change events when the dashboard filter action fires. This could be the cause of trouble.

Here are the actions that I performed, with the results from getSummaryDataAsync called from the event handler. I just log the data table to the console. In this case, there are 20 rows of data:

Click to select single item (all the others are filtered out, so we show a single row) DataTable {_data: Array[1], _columns: Array[2], ... DataTable {_data: Array[1], _columns: Array[2], ...

Click off of any item (ALL items are filtered out, no rows showing) DataTable {_data: Array[0], _columns: Array[0], ... DataTable {_data: Array[0], _columns: Array[0], ...

Click on "All" in filter (no rows showing) DataTable {_data: Array[0], _columns: Array[0], ...

Click on "All" filter again (toggling the filter, now all rows showing) DataTable {_data: Array[20], _columns: Array[2], ...

I'm hoping that the issue is the two filter events firing. I will look into that. Let me know if I missed the crux of the issue. John

johnDance avatar Jul 12 '18 21:07 johnDance

Awaiting more clarification to reopen. Thanks.

johnDance avatar Dec 29 '22 01:12 johnDance