Position of element in Dependent Select Field Option

I have a status field in a Model, where I want to show specfic set of options in Select Field based on value of status
I find that position of element is not correct after selecting and updating a form. Let me explain it with example:
If current status is triage and user selects 'in_progress' and save form. then Form shows the correct new options in Select (in_progress, complete, triage) but current selected option it shows is 'complete' whereas its current state is 'in_progress'
Can someone please have a look at following code, If I am doing something wrong.
return $form
            ->schema([
                Select::make('status')
                ->options(fn (Get $get): array => match ($get('status')) {
                    'triage' => [
                        'triage' => 'Triage',
                        'in_progress' => 'In Progress',
                        'backlog' => 'Backlog',
                    ],
                    'in_progress' => [
                        'in_progress' => 'In Progress',
                        'complete' => 'Complete',
                        'triage' => 'Triage',
                    ],
                    default => [
                        'triage' => 'Triage',
                        'in_progress' => 'In Progress',
                        'backlog' => 'Backlog',
                    ],
                })
            ]);
    }
Was this page helpful?