Is there any simple way to alias "handler"? #61
Replies: 2 comments
-
Thank you for your question, there are always plenty of possible approaches To use the directive shortcuts, the component property and the variable name must be the same. <Datatable handler={patHandler}>
<Th handler={patHandler} orderBy="firstName">First</Th> Apart from this inconvenience everything works as expected. Personnally, in this case I would go for 2 distinct components to keep the logic well separated - 1 component per DataHandler instance. |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
-
I originally designed my app using Skeleton's datatables (I know, I know - they warned us it wasn't supported), and - after a lot of messing around - I built my note creation/edit selection page with two tables side by side: choose the subject from the list on the left, and the right-side table is populated with that subject's note history.
I'd like to do the same with Svelte Simple Datatables, but it requires more than one Datahandler on the page, and the Datatable and Th components both require a prop named "handler".
Is there a simple way to do e.g.
etc.?
This will either be 1) ridiculously complicated, in which case I will regret asking, or 2) ridiculously simple, in which case I will feel dumb for asking. But I thought I'd ask anyway!
I love SDD, by the way - it really is MUCH simpler to use, and search/sort Just Works™️.
Beta Was this translation helpful? Give feedback.
All reactions