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

feat(filters): add onFilterUpdate handler to list view filters #21443

Merged
merged 2 commits into from
Sep 19, 2022

Conversation

riahk
Copy link
Contributor

@riahk riahk commented Sep 12, 2022

SUMMARY

Adds a onFilterUpdate optional prop to the Filters component (used in ListView). Additionally, add a flag to distinguish between clear/update events in the Select filter component.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Merging #21443 (36f852c) into master (9c285da) will increase coverage by 0.03%.
The diff coverage is 74.19%.

❗ Current head 36f852c differs from pull request most recent head e8a8bf3. Consider uploading reports for the commit e8a8bf3 to get more accurate results

@@            Coverage Diff             @@
##           master   #21443      +/-   ##
==========================================
+ Coverage   66.53%   66.57%   +0.03%     
==========================================
  Files        1791     1791              
  Lines       68599    68523      -76     
  Branches     7320     7321       +1     
==========================================
- Hits        45645    45619      -26     
+ Misses      21064    21009      -55     
- Partials     1890     1895       +5     
Flag Coverage Δ
javascript 52.74% <51.51%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
.../plugin-chart-echarts/src/Timeseries/buildQuery.ts 66.66% <ø> (ø)
...frontend/src/components/DatabaseSelector/index.tsx 95.23% <ø> (ø)
...rontend/src/components/ListView/Filters/Select.tsx 52.38% <0.00%> (ø)
.../CRUD/data/database/DatabaseModal/ExtraOptions.tsx 83.33% <ø> (ø)
superset/cli/update.py 0.00% <ø> (ø)
superset/config.py 91.58% <ø> (-0.03%) ⬇️
superset/dashboards/schemas.py 99.46% <ø> (-0.01%) ⬇️
superset/databases/api.py 95.49% <ø> (ø)
superset/db_engine_specs/base.py 89.56% <ø> (+1.55%) ⬆️
... and 30 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

if (onFilterUpdate) {
// Filter change triggers both onChange AND onClear, only want to track onChange
if (!isClear) {
onFilterUpdate(option);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onFilterUpdate?.(option); would work too

@riahk riahk merged commit f27e20e into apache:master Sep 19, 2022
@riahk riahk deleted the moriah/list-view-filter-listeners branch September 19, 2022 18:42
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants