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

fix(filter, list): filter properly on initialization #6551

Merged
merged 2 commits into from
Mar 2, 2023

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented Mar 1, 2023

Related Issue: #6523

Summary

This fixes initial filtering on consumers of calcite-filter.

Notable changes

list

  • updateListItems (private) is no longer debounced to allow updated values to be passed to the internal filter. This was also called whenever the items are modified (MutationObserver), so this could be revisited later if we see noticeable impact on performance
  • Corrected assertion where filteredItems and filteredData were not matching (one reflects the other)
  • Added new test

filter

  • Removed a duplicate filter call that would interfere with the initial one – (introduced here, possibly an oversight)
  • Restored skipped test
  • Updated test to cover filtering with default filter text

@jcfranco jcfranco requested a review from a team as a code owner March 1, 2023 07:31
@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Mar 1, 2023
@jcfranco jcfranco added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Mar 1, 2023
Copy link
Contributor

@anveshmekala anveshmekala left a comment

Choose a reason for hiding this comment

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

🚀

@jcfranco jcfranco changed the title fix(filter, list, pick-list, value-list): filter properly on initialization fix(filter, list): filter properly on initialization Mar 2, 2023
@jcfranco jcfranco merged commit b7782aa into master Mar 2, 2023
@jcfranco jcfranco deleted the jcfranco/6523-fix-list-initial-filtering branch March 2, 2023 00:37
benelan added a commit that referenced this pull request Mar 7, 2023
…tory

* origin/master: (57 commits)
  ci(eslint): ignore private/internal code for jsdoc rules (#6416)
  fix(modal): ensure modal transitions are in sync (#6564)
  fix(action): ensure consistent width to accommodate indicator when displaying text (#6562)
  build(deps): Bump focus-trap from 7.2.0 to 7.3.1 (#6540)
  feat(block): add built-in localization (#6503)
  revert(stepper-item): emits calciteStepperItemSelect event when selected (#6560)
  refactor: move ref prop last to ensure ref node is in sync (#6530)
  feat(stepper-item): emits `calciteStepperItemSelect` event when selected. (#6521)
  build(deps): Bump @storybook/addon-a11y from 6.5.15 to 6.5.16 (#6539)
  build(deps): Bump eslint from 8.30.0 to 8.35.0 (#6543)
  chore(block): add t9n message bundles. (#6559)
  build: ensure required files are available for doc preview build (#6557)
  fix(slider): range slider thumb on all touch-enabled devices now follows touch gesture (#6553)
  feat(modal): provides `content-top` and `content-bottom` slots (#6490)
  chore(release): 1.0.8
  chore(release): 1.0.8-next.4
  fix(filter, list): filter properly on initialization (#6551)
  chore(release): 1.0.8-next.3
  fix: apply offsetParent polyfill for Chrome 109+ (#6520)
  fix(tree): restore wrapping in tree-item text content (#6518)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants