owl
owl copied to clipboard
Use t-slots on any HTMLElement (+ with attributes) and not just on the <t />
Actual use case:
framework:
<template t-name="Dropdown">
...
<ul class="frameworky_dropdown_items_class">
<t t-slot="items" />
</ul>
</template>
note: frameworky_dropdown_items_class does nothing, it's just a hook for style.
end user
<Dropdown>
...
<t t-set-slot="items">
...
</t>
</Dropdown>
User: I can't give attributes to the <ul> and must rely on a class defined by the framework to style it 😢
Preferable use case:
framework:
<template t-name="Dropdown">
...
<ul t-slot="items" />
</template>
end user
<template t-name="Dropdown">
<ul t-slot="items" class="super_user_class another_one" whatever="something" />
</template>
User: 💯 🔥
@brboi
@ged-odoo This is regarding the issue you discussed with Bruno yesterday.