You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To be able to easily render a component (e.g. a RplDataTable) within a RplAccordion item, by using a slot for accordion content.
Motivation
Currently the accordion takes an items array of objects to define item id, title & content (HTML passed as string). This makes it difficult to setup complex HTML or render Vue components in accordion content.
Proposal
Use a slot (default slot) to capture accordion content. The slot content's children will be used as the content for the separate items entries. i.e. slot children length must equal items length.
Titles could optionally be passed the same way, via a named slot title. The items prop could even be optional, using an auto-assigned integer index (1-based) as item.id if not set.
Benefits
Ease of rendering accordions with complex content.
Drawbacks
Maybe confusion as to the slot children aspect (i.e. slot has 5 tags => 5 accordion items)? Might dynamically named slots e.g. <slot name="content[0]"> be better, or more confusing?
Adoption strategy
Update documentation. No breaking changes, accordion can be used as current.
Additional information
Would you be willing to help implement this feature?
Could this feature be created outside of Ripple-framework as a layer?
Final checks
I have read the contribution guide for information on submitting a feature request.
I have checked the discussions and issues for duplicate feature requests.
The text was updated successfully, but these errors were encountered:
Describe the feature
To be able to easily render a component (e.g. a
RplDataTable
) within aRplAccordion
item, by using a slot for accordion content.Motivation
Currently the accordion takes an
items
array of objects to define item id, title & content (HTML passed as string). This makes it difficult to setup complex HTML or render Vue components in accordion content.Proposal
Use a slot (default slot) to capture accordion content. The slot content's children will be used as the content for the separate
items
entries. i.e. slot children length must equalitems
length.Titles could optionally be passed the same way, via a named slot
title
. Theitems
prop could even be optional, using an auto-assigned integer index (1-based) asitem.id
if not set.Benefits
Ease of rendering accordions with complex content.
Drawbacks
Maybe confusion as to the slot children aspect (i.e. slot has 5 tags => 5 accordion items)? Might dynamically named slots e.g.
<slot name="content[0]">
be better, or more confusing?Adoption strategy
Update documentation. No breaking changes, accordion can be used as current.
Additional information
Final checks
The text was updated successfully, but these errors were encountered: