Page MenuHomePhabricator

HTMLMultiSelectField elements with sections cannot be infused
Open, Needs TriagePublic

Description

If an HTMLMultiSelectField element uses sections, e.g.:

$fields['Foo'] = [
	'type' => 'multiselect',
	'options-messages' => [
		'section-1-msg' => [
			'opt-1.1-msg' => 1,
			'opt-1.2-msg' => 2,
		],
		'section-2-msg' => [
			'opt-2.1-msg' => 3,
			'opt-2.2-msg' => 4,
		],
	],
];

Then it cannot be infused in JavaScript. First of all, if you specify a cssclass on the element, it gets applied to the whole field, as well as every section. But even after you identify the actual element you want to infuse, it still won't work because nothing inside the main field's tree has data-ooui attributes.