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

Refactor cleanFilter() and auto-initialize filters parameter #213

Conversation

bdelamatre
Copy link
Contributor

  • Refactored cleanFilter() to filter out all keys that don't have a filters() definition
  • When cleaning filters, force typecasting on integer values
  • added mountWithFilters which will auto-initialize $filters from filters(). This removes the requirement to define $filters and filters().

I wasn't able to find a proper way in livewire to typecast these values, hence the typecasting when a specific type is checked. I am sure there is a better way to handle this, but this works.

@rappasoft rappasoft added the Awaiting Next Release Currently merged into development awaiting a release to master label Apr 19, 2021
@rappasoft
Copy link
Owner

Made some slight tweaks to cleanFilters but I don't think I changed any of what you were after.

@rappasoft
Copy link
Owner

Screen.Recording.2021-04-18.at.22.27.05.mov

Also currently have an issue with multiple filters and removing the pills. Seems to be a conflict with the wire:key's. I renamed them all to be unique but I'm still having issues.

@rappasoft
Copy link
Owner

Think I fixed it with this commit: 392e7d5

@rappasoft rappasoft mentioned this pull request Apr 19, 2021
@rappasoft
Copy link
Owner

I don't know why this didn't get merged with the last dev->master but the code is in there.

@rappasoft rappasoft closed this Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Next Release Currently merged into development awaiting a release to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants