Set Content Explorer to Grid View

I am scratching my head here. Box Embed offers a ‘view’ parameter to allow you to set list or grid view, however I need programatically set Content Explorer to default to grid view when loading (it is for a content portal of photographs, so thumbnails are much easier to view than generic file icons). Any ideas here anyone?

Hi @contentCore , welcome to the forum!

This was intriguing and I had to go and ask around the dev team of UI Elements.

Unfortunately there no prop that will put the explorer into grid view at start.

I was wondering if a workaround is possible, something like doing a javascript .click() on the button.

Something like:

btn=document.body.querySelector('[data-testid="view-mode-change-button"]')
btn.click()

Not an elegant solution for sure, but it might work.

On a second note, I would appreciate if you could enter this feature request into our product feedback.

This is the main way our product managers get feedback, and this entry would put this missing feature on their road map.

Let us know if this helps at all…

Best regards

Thanks Rui - was really surprised this doesn’t exist, as it is does for the basic Embed. All of my users need that extra click now to switch view. Have submitted feedback for this.

Sadly cannot use a click function as the Explorer is inside an iframe - not ideal, but (here comes more feedback) - if you use the explorer css on a site based on Bootstrap CSS there are numerous CSS clashes which I did not have the strength to resolve in the limited time available.

Much appreciated.

Thanks for the feedback, please do include it on that pulse.box.com.

Best regards