[wp-trac] [WordPress Trac] #47692: Optgroup in Customizer Select Control
WordPress Trac
noreply at wordpress.org
Wed May 20 14:25:34 UTC 2020
#47692: Optgroup in Customizer Select Control
-------------------------+-----------------------------
Reporter: chintan1896 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Customize | Version: 3.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+-----------------------------
Comment (by Lwangaman):
I can see a problem there already: in javascript arrays are also objects.
I'm not sure of all the use cases of the **select** component in react but
I have a hunch there could be a problem here if
{{{#!javascript
_.isObject( val )
}}}
evaluates to true because we are using an array as the value. It will now
however find a **val.value** property in this object.
It would be useful to know in which cases the **choices** value is a
string and in which cases it is an object, in the current state of things.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47692#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list