fix: field editor bugs (#4241)

This commit is contained in:
Richard Shiue 2023-12-29 11:35:53 +08:00 committed by GitHub
parent 93786bad44
commit c821b8c4fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -55,7 +55,7 @@ class _MobileEditPropertyScreenState extends State<MobileEditPropertyScreen> {
LocaleKeys.grid_field_editProperty.tr(),
),
leading: AppBarBackButton(
onTap: () => context.pop(),
onTap: () => context.pop(field),
),
),
body: FieldOptionEditor(
@ -108,7 +108,7 @@ class _MobileEditPropertyScreenState extends State<MobileEditPropertyScreen> {
service.show();
break;
}
context.pop();
context.pop(field);
},
),
);

View File

@ -202,8 +202,9 @@ class _FieldOptionEditorState extends State<FieldOptionEditor> {
() {
if (widget.mode == FieldOptionMode.add) {
controller.text = type.i18n;
_updateOptionValues(name: type.i18n);
}
_updateOptionValues(type: type, name: type.i18n);
_updateOptionValues(type: type);
},
),
),

View File

@ -77,6 +77,7 @@ class _QuickEditFieldState extends State<QuickEditField> {
widget.fieldInfo.field.freeze();
final field = widget.fieldInfo.field.rebuild((field) {
field.name = controller.text;
field.fieldType = fieldType;
});
final optionValues = await showEditFieldScreen(
context,