flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

passing in arguments to modal event handlers

Open anjanesh opened this issue 2 years ago • 2 comments

using flowbite's modal using javascript

onclick="modal.show(546)"

  onShow: (index) => {
      console.log('modal is shown for index = ' + index);
  },

index is showing as [Object] which is the modal element.

https://gist.github.com/anjanesh/c77423bfc7cdc31f391ca81a76a11ac3

anjanesh avatar Aug 16 '23 12:08 anjanesh

I don't think that the right argument is passed into the modal. It looks more like the whole modal is shown in the console. Including the onShow itself :-) Sorry. Good luck figuring this out.

image

haenno avatar Aug 18 '23 13:08 haenno

@zoltanszogyenyi

it would be usefull to have some kind of reference in onShow() function to the object that is being shown. I stumbled upon this with TABS - how can I see which tab is being shown in its onShow() method?

RadekHavelka avatar Oct 20 '23 07:10 RadekHavelka