New API for slots #522
Replies: 4 comments 1 reply
-
|
We should certainly incorporate scoped slots from #514 as well. |
Beta Was this translation helpful? Give feedback.
-
|
From a EasyGUI beginner's point of view, the method name Perhaps |
Beta Was this translation helpful? Give feedback.
-
|
Introduced in #514 we do now have scoped slot and named slot support. (see the table element example code in the project) I advocate to keep the |
Beta Was this translation helpful? Give feedback.
-
|
Hmm. Is this still relevant? The |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In #500 we stumbled upon the question whether we should improve the API for adding slots to elements. Currently you write
to add an icon to the slot "append". See https://quasar.dev/vue-components/input#qinput-api for a list of supported slots.
One idea (💡1) was to define properties
or methods (💡2)
to provide auto-completion and documentation. But this clutters the namespace quite a lot. And some slots might have names with different meaning in the Python world, like "append" being known for adding items to lists.
But inspired from #362 we could also introduce a namespace that holds all slots (💡3):
Maybe there's also an
input.slots.add(...)as an alias forinput.add_slot(...).Or we support calling the sub-namespace (💡4):
or
Beta Was this translation helpful? Give feedback.
All reactions