[v-clicks] `depth` parameter
Is your feature request related to a problem? Please describe.
When using the <VClicks> component or the corresponding directive with nested lists (see example for one below), then only the top-level elements will be "keyed" for clicks.
Example list
- Entry 1
- Entry 2
- Entry 2a
- Entry 2b
- Entry 2bA
- Entry 3
It'd lead to three clicks and the reveal order would be Entry 1, Entry 2 and all sublists, Entry 3. There is no way to "key" sublists individually or make them open one-by-one as well.
Describe the solution you'd like
Instead of adding the directive manually there, a depth attribute for the component (or value/attribute for the directive) would be desirable IMO. The value would be 1 by default to keep the current behavior.
-
depth=2would have the following order: Entry 1, Entry 2, Entry 2a, Entry2b with sublist (Entry 2bA), Entry 3 -
depth=3would have the following order: Entry 1, Entry 2, Entry 2a, Entry2b, Entry 2bA, Entry 3
Describe alternatives you've considered
A suitable option would be applying v-click manually (what I tend to do at the moment). This is fine but a depth param would add more convenience π
Another alternative to the depth parameter would be adding v-click to each subitem (of lists). But this is less configurable and also changes the standard behavior
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Not stale βΊοΈ
Strongly second this!
Would this be a duplicate of https://github.com/slidevjs/slidev/issues/362?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Would this be a duplicate of #362?
Yes and no. Definitely related but not strictly a duplicate I'd say
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
not stale π
Noo stale bot. Why π
@manniL it works in v0.40.5! Thanks @tonai I needed this today and saw it just released.
Indeed, resolved by https://github.com/slidevjs/slidev/pull/893 ππ»
Just in time :sweat_smile: