Select2 supports optgroup wrappers to nest options. See: https://select2.org/options
Is it possible to pass these to the fieldOptions hook? Use case -- I have a custom field for which I'll populate (or manipulate) the options via the fieldOptions hook. I'd like to organize these into groups for display.