My UI uses option groups in drop downs and I would like to be able to localize the labels.
I could do this with a custom callback but I propose that this is a reasonable thing for the default callback to handle. Handling the optgroup would require adding (essentially...) :
tag = elem.attr('tagName');
....
else if (tag === 'OPTGROUP') {
elem.attr('label', value);
}
I think this is a better option than reimplementing the default callback as a custom cb (with the simple addition). The other option would be to scan for the optgroups in a custom cb and "fallthrough" to the default but, this would iterate the wrappedset twice which would not be good.
My UI uses option groups in drop downs and I would like to be able to localize the labels.
I could do this with a custom callback but I propose that this is a reasonable thing for the default callback to handle. Handling the optgroup would require adding (essentially...) :
I think this is a better option than reimplementing the default callback as a custom cb (with the simple addition). The other option would be to scan for the optgroups in a custom cb and "fallthrough" to the default but, this would iterate the wrappedset twice which would not be good.