Open solepixel opened 8 years ago
+1
I have a list of records in a table. I would like to dynamically pass data or get the clicked element so I can identify which row to delete.
I ended up accomplishing this by creating the modal dynamically from the click event of the source element, but I think passing the clicked element into the opening callback would be a much more elegant solution.
Is it possible to load content dynamically into the modal using the "opening" event by reading information from the clicked element? I'm trying to use:
However
e
doesn't seem to have the element that was clicked.e.target
appears to be the actual modal. Any way to grab the clicked element?If not, what's the best way to pass data into the modal for loading?