Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Form] Recall for choice group_by ordering #31593

Closed
@ro0NL

Description

@ro0NL

When the choice_loader is built-in / out of scope, working with the choices can be a real pain. As such i'd like to recall for #21717 / #22136

Given

$form = $this->createForm(TimezoneType::class, null, [
    'intl' => true,
    'group_by' => function ($tz) {
        return Timezones::getGmtOffset($tz);
    },
]);

The UX is completely off due default ordering;

image

Perhaps this should be solved per type, but i tend to believe having some generic solution is nice. Or maybe there's a better way?

Moreover, as we deprecated the region/zone option; there's currently no sane alternative to apply such a filter. Consider #28624 for this :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions