-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(table): make some slots available either as scoped or unscoped #2740
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In version of Vue prior to 2.6, scoped slots and un-scoped slots were separate entities. Now all regular names (un-scoped) slots are also available in the `$scopedSlots` as functions (which provide render speed optimizations, over regular $slots). The non item slots are now all available as optionally scoped: - `colgroup` - `thead-top` - `HEAD_<field_key>` - 'FOOT_<field_key>` - `empty` - `emptyfiltered` When the user provides a slot-scope, these slots will be called as $scopedSlots, and passed a slot scope context. Uses the new normalize-slots mixin.
Codecov Report
@@ Coverage Diff @@
## dev #2740 +/- ##
==========================================
+ Coverage 74.85% 74.89% +0.03%
==========================================
Files 175 176 +1
Lines 3194 3195 +1
Branches 943 942 -1
==========================================
+ Hits 2391 2393 +2
+ Misses 586 585 -1
Partials 217 217
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Also always returns an array from `normalizeSlot` if vNode(s) exist.
Co-Authored-By: tmorehouse <troymore@nbnet.nb.ca>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Pull Request:
In versions of Vue prior to 2.6, scoped slots and un-scoped slots were separate entities. Now all regular names (un-scoped) slots are also available in the
$scopedSlots
as functions (which provide render speed optimizations, over regular $slots). This PR makes optionally scoped slots work with Vue 2.5.x.The following slots are now all available as optionally scoped:
colgroup
thead-top
HEAD_<field_key>
FOOT_<field_key>
empty
emptyfiltered
top-row
bottom-row
When the user provides a slot-scope, these slots will be called as $scopedSlots, and passed a slot scope context.
Uses the new normalize-slots mixin.
Will also introduce optional scoped slots into other components (such as modal) for passing methods to the slots in a separate PR.
PR checklist:
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact:
The PR fulfills these requirements:
dev
branch, not themaster
branchfixes #xxxx[,#xxxx]
, where "xxxx" is the issue number)and adding a new feature, break them into separate PRs if at all possible.
Conventional Commits naming convention (i.e.
"fix(alert): not alerting during SSR render", "docs(badge): Updated pill examples, fix typos",
"chore: fix typo in docs", etc). This is very important, as the
CHANGELOG
is generatedfrom these messages.
If new features/enhancement/fixes are added or changed:
package.json
for slot andevent changes)
keyboard only users? clickable items should be in the tab index, etc)
If adding a new feature, or changing the functionality of an existing feature, the PR's
description above includes:
suggestion issue first and wait for approval before working on it)