mirror of
https://github.com/zhigang1992/firecms.git
synced 2026-01-12 22:47:25 +08:00
Minor type fixes
This commit is contained in:
@@ -153,8 +153,8 @@ function PopupFormField<S extends EntitySchema<Key>, Key extends string>({
|
||||
|
||||
const validationSchema = getYupEntitySchema(
|
||||
name ?
|
||||
{ [name]: schema.properties[name] } as Partial<PropertiesOrBuilder<S, Key>>
|
||||
: {},
|
||||
{ [name]: schema.properties[name] } as PropertiesOrBuilder<S, Key>
|
||||
: {} as PropertiesOrBuilder<S, Key>,
|
||||
entity?.values ?? {},
|
||||
collectionPath,
|
||||
customFieldValidator,
|
||||
|
||||
@@ -82,7 +82,7 @@ export function mapPropertyToYup(propertyContext: PropertyContext<any>): AnySche
|
||||
}
|
||||
|
||||
export function getYupEntitySchema<T extends CMSType, S extends EntitySchema<Key>, Key extends string>
|
||||
(properties: Partial<PropertiesOrBuilder<S, Key>>,
|
||||
(properties: PropertiesOrBuilder<S, Key>,
|
||||
values: Partial<EntityValues<S, Key>>,
|
||||
collectionPath: string,
|
||||
customFieldValidator?: CustomFieldValidator,
|
||||
|
||||
@@ -278,6 +278,7 @@ function sanitizeData<S extends EntitySchema<Key>,
|
||||
*
|
||||
* @param doc
|
||||
* @param schema
|
||||
* @param collectionPath
|
||||
* @category Firestore
|
||||
*/
|
||||
export function createEntityFromSchema<S extends EntitySchema<Key>,
|
||||
|
||||
Reference in New Issue
Block a user