I was able to get smart select working within a popup that I have for article editing. In each article I have a set of potential hero images to choose from during the edit process. The images are 1200px but I want to be able to display them as 300x250 images in smart select. How can I set the width and height OR apply a CSS class to the img html tags created by smart select?
note: I am using Cloudinary for images so I could create a transform there for the width and height I need but would like to have the option of modifying the CSS style of items in smart select
note: i’ll be shifting this to a template each loop later since there could be 1 hero image or 15 hero images
If I can call a method when the smart select popup closes is there a way to also send the method the resulting value of the selection? e.g. “0” or “1” or “2” etc in my case.
Is the event object sent in to the routine like it is for @click? Could I get access to the selected value using that event object?
Currently this is all in a component and I don’t create the smart select programmatically. If I can’t get the value from the event object what would be the best way in a method of my component to get access to the smart select object.
Here is my a little more of the extended component template including loops. What I want to do when a smart selection is made and the selection popup is closed is to change “selectedimage” to the image chosen in the smart select.