Disabling writing in Select or ComboBox


Is it possible to disable the writing in a Select or ComboBox component, so that when I click anywhere on the component it would just pop open like a NativeSelect?

// Jonas

Currently, no.

Why do you need such functionality? Why not just use NativeSelect then?

I’m just guessing here, but you want it because you need to modify the theme for it, am I right?

Actually I have old code which behaves ok with Select or ComboBox, but for some reason NativeSelect is not working ok. Select or ComboBox cannot be used if the write mode can’t be switched off.

My problem is the following:
I have four NativeSelects A,B,C,D. C and D are hidden and choosing A activates B and chosing B activates and shows C and D selects. The probelm is that when C and D are activated they look like an empty ComboBox until I manually refresh the page which updated the component to a filled NativeSelect which it should be.

This is actually a bug in the layout (as strange as that might sound).
Feel free to add ticket…

As a workaround, until we get that particular issue fixed in 5.2, it should work if you add C and D when they are needed (instead of adding in advance and unhiding). That is: don’t add hidden NativeSelects, only visible ones. This is not an optimal solution, I know, but should work.

Ok, good to know then. I’ll just rewrite my code a bit.

Added a ticket about this issue: http://dev.itmill.com/ticket/2203

Thanks for the answer,
// Jonas