I'm writing a Javascript based plugin which creates an instance of Craft.BaseElementSelectorModal
.
When the modal is created, I'd like to have some of the entries in the modal's element index auto-selected (i.e. their containers should have the sel
class added, just like when the user actually selects an entry). I have an array of entry IDs to work with, but I'm struggling to find a way to actually set the element index' selected entries.
As far as I can tell, there aren't any parameters I can set to the BaseElementSelectorModal
(aside from disabledElementIds
, which I can't use as I don't actually want the entries to be disabled, only selected).
I can get to the modal's BaseElementIndex instance – is there a way to programmatically select an array of entries?