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

Option: keep cached options #17432

Closed
wants to merge 4 commits into from
Closed

Option: keep cached options #17432

wants to merge 4 commits into from

Conversation

ahoulgrave
Copy link

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow Element's contributing guide (中文 | English | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

While working with select component with remote, filterable, deleting and allow-create the cachedOptions causes issues when showing the selected value.

If we remove an element from selected values on the change event, the options will be empty and the select won't have the cached options to take the label from, so the selected values will display a wrong label.

There is no harm on keeping the cache.

@element-bot
Copy link
Member

element-bot commented Sep 12, 2019

Deploy preview for element ready!

Built with commit d856d67

https://deploy-preview-17432--element.netlify.com

@ahoulgrave
Copy link
Author

Rewrote the PR so it will only delete options and cached options if they are not selected.

@a631807682
Copy link
Contributor

Duplicate of #17396

@ahoulgrave
Copy link
Author

Perfect, thanks

@ahoulgrave ahoulgrave closed this Sep 16, 2019
@ahoulgrave ahoulgrave deleted the select-bugfix branch September 16, 2019 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants