trestle icon indicating copy to clipboard operation
trestle copied to clipboard

How do we use `options.modalClass`

Open jfrux opened this issue 7 years ago • 3 comments

Trying to figure out if I can pass a specific class name to a modal triggered from a specific index.

I mean, I know how I can rig it... but didn't know if there was a "Trestle" or "Rails" way of doing it as of right now.

jfrux avatar Sep 14 '18 13:09 jfrux

Nevermind, I think I see how I could do it... Just use render layout: 'dialog-something' and make my own version of the dialog layout.

jfrux avatar Sep 14 '18 18:09 jfrux

Gah, spoke to soon. I then tried to override the js file for components/_dialog.js but that doesn't seem to do anything.

Was going to look for a property for "modelClass" or something in the data- of the link and append it to the #dialog but hmm...

jfrux avatar Sep 14 '18 18:09 jfrux

The way this currently works, the (relatively limited) dialog customizations are controlled by the link that initiates the dialog. You can set a custom modal class using the data-dialog-class attribute on the link.

spohlenz avatar Sep 15 '18 12:09 spohlenz