How to utlize `cb`?
bilogic opened this issue · comments
tailwindcss-stimulus-components/src/dropdown.js
Lines 99 to 112 in 11f7338
I noticed this cb
in the controllers, does it mean there is a way to pass a callback into the controllers?
My use case is, I would like to have a toggle switch to change some setting on the server, but I don't want to be hardcoding the XHR/AJAX inside the controller itself.
Any examples of how I can do this callback from controller back to the HTML side?
Thank you.
UPDATE: ok, I misunderstood the code