TF-4370 Fix selector/key wiring: modal instantiation does not pass the key the test expects
This commit is contained in:
@@ -148,6 +148,7 @@ class LabelController extends BaseController with LabelContextMenuMixin {
|
||||
|
||||
await DialogRouter().openDialogModal(
|
||||
child: CreateNewLabelModal(
|
||||
key: const Key('create_new_label_modal'),
|
||||
labels: labels,
|
||||
onLabelActionCallback: (label) => _createNewLabel(accountId, label),
|
||||
),
|
||||
|
||||
@@ -363,6 +363,7 @@ class _CreateNewLabelModalState extends State<CreateNewLabelModal> {
|
||||
|
||||
void _clearInputFocus() {
|
||||
_nameInputFocusNode.unfocus();
|
||||
_descriptionInputFocusNode.unfocus();
|
||||
}
|
||||
|
||||
void _onCreateNewLabel() {
|
||||
@@ -373,7 +374,9 @@ class _CreateNewLabelModalState extends State<CreateNewLabelModal> {
|
||||
color: _selectedColor != null
|
||||
? HexColor(_selectedColor!.toHexTriplet())
|
||||
: null,
|
||||
description: _descriptionInputController.text,
|
||||
description: _descriptionInputController.text.trim().isEmpty
|
||||
? null
|
||||
: _descriptionInputController.text.trim(),
|
||||
);
|
||||
widget.onLabelActionCallback(newLabel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user