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

Remove Vue Select and Add Column Filter Slot #742

Merged
merged 18 commits into from
Aug 9, 2020

Conversation

robgaston1
Copy link
Contributor

Addresses issue #675

Notes:

  • Add a slot in VgtFilterRow
  • Create a method updateSlotFilter that includes the custom filter with the rest of the column filter values
  • Expose the method as a prop on the slot so it can be optionally used
  • Allow a slotFilterField to be passed in, because the property used for display may not be the same as the property for filtering
  • Remove the vue-select code to reduce the overall bundle size.

@xaksis
Copy link
Owner

xaksis commented Aug 5, 2020

@robgaston1 could you please add migration documentation for this as well? That would be immensely helpful.

  • how to use the new slot - done.
  • a guide to migration for people who're currently using v-select. - todo

}
}
```
::: tip Upgrading from versions 2.19.0-2.20.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xaksis I wasn't sure where it was desirable to have the migration guide. I notice there are some things like that in the wiki, but wasn't sure if I can/should contribute to that.

I just put it here for now, but let me know if different.

@@ -162,17 +145,25 @@ export default {
this.updateFilters(column, value);
},

updateSlotFilter(column, value) {
let fieldToFilter = column.filterOptions.slotFilterField || column.field;
if (typeof column.filterOptions.formatValue === 'function') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was an addition today, FYI. In working with this branch in our team project, I was formatting the filter data right before passing it in, but passing the function into the table made it much cleaner and enhanced reusability in our own codebase.

dev/App.vue Outdated Show resolved Hide resolved
robgaston1 and others added 6 commits August 7, 2020 10:49
@TheJaredWilcurt
Copy link
Collaborator

I only had a few PR comments, and they have all been resolved.

I am able to run this branch locally and follow the documentation to migrate to manually adding vue-select into the new custom-filters slot. This seems to work as intended. Will wait on @xaksis to approve.

Once merged the build size will be reduced by ~15% due to the removal of Vue-Select.

Reduction in build size

If merged this will resolve several other issues:

It will also effect this one #732. Debounce will need to be removed on custom filter slots

@xaksis xaksis merged commit 7017062 into xaksis:master Aug 9, 2020
@xaksis
Copy link
Owner

xaksis commented Aug 9, 2020

@robgaston1 Fantastic! Thank you for this PR. @TheJaredWilcurt thank you for testing. So happy about the bundle size reduction. 👍 PR merged and released.

@TheJaredWilcurt
Copy link
Collaborator

All related issues and their stakeholders have been updated. All 7 "fixed by" issues closed.

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