fix: ensures email is still prefilled in auth configs
This commit is contained in:
@@ -12,9 +12,7 @@ const buildValidationPromise = async (fieldState: Field, field: FieldSchema, ful
|
||||
|
||||
let validationResult: boolean | string = true;
|
||||
|
||||
if (!passesConditionalLogic) {
|
||||
validationResult = true;
|
||||
} else if (typeof field.validate === 'function') {
|
||||
if (passesConditionalLogic && typeof field.validate === 'function') {
|
||||
validationResult = await field.validate(fieldState.value, field);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,10 +27,6 @@ const formatFields = (config) => {
|
||||
if (config.auth) {
|
||||
fields = fields.concat([
|
||||
{
|
||||
name: 'email',
|
||||
label: 'Email',
|
||||
type: 'email',
|
||||
}, {
|
||||
name: 'enableAPIKey',
|
||||
label: 'Enable API Key for this user',
|
||||
type: 'checkbox',
|
||||
|
||||
@@ -8,7 +8,9 @@ export default [
|
||||
type: 'email',
|
||||
validate: email,
|
||||
admin: {
|
||||
disabled: true,
|
||||
components: {
|
||||
Field: () => null,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user