Allow saving when toggling enabled

This commit is contained in:
Gabe Kangas 2021-02-01 16:21:58 -08:00
parent 66f15ceaff
commit 838f34d0d0

View File

@ -27,6 +27,9 @@ const { Panel } = Collapse;
function checkSaveable(formValues: any, currentValues: any) {
const { endpoint, accessKey, secret, bucket, region, enabled, servingEndpoint, acl } = formValues;
// if fields are filled out and different from what's in store, then return true
if (!enabled || enabled !== currentValues.enabled) {
return true;
}
if (enabled) {
if (!!endpoint && isValidUrl(endpoint) && !!accessKey && !!secret && !!bucket && !!region) {
if (