How to change width of dat.gui dropdown menu and deselect item

83 Views Asked by At

I'm using the dat.gui library in javascript and I have two questions:

  1. How to change the width of a dat.gui dropdown menu?
  2. How to de-select a dropdown menu item without selecting another?

Initializing the dropdown

const indexParams = {
  index: -1,
};
const indexGUI = gui.addFolder("Index");
indexGUI.open();
const indexDropdown = indexGUI.add(indexParams, "index", [0, 1, 2, 3, 4]);

Image of the dropdown before interaction Initial Dropdown

0

There are 0 best solutions below