fix: don't delete the property if it shouldn't be allowed (#1633)

This commit is contained in:
Richard Shiue 2023-01-04 10:20:18 +08:00 committed by GitHub
parent ddc99d646c
commit c5b15daac4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -218,7 +218,9 @@ class _DeleteFieldButton extends StatelessWidget {
LocaleKeys.grid_field_delete.tr(),
color: enable ? null : Theme.of(context).disabledColor,
),
onTap: () => onDeleted?.call(),
onTap: () {
if (enable) onDeleted?.call();
},
onHover: (_) => popoverMutex.close(),
);
return Padding(