Skip to content

Commit

Permalink
fix: hook schema event raise should consider array type
Browse files Browse the repository at this point in the history
  • Loading branch information
tinymins committed Sep 3, 2024
1 parent 8d6aa56 commit e4aee72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/drip-table/src/layouts/table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ const hookColumRender = <
};

function hookSchemaEventRaiser<T>(schema: T, schemaFunctionPreprocessor: SandboxFunctionPreprocess, props: Record<string, unknown>): T {
if (Array.isArray(schema)) {
return schema.map(v => schemaFunctionPreprocessor(v, props)) as T;
}
if (schema && typeof schema === 'object') {
return Object.fromEntries(
Object.entries(schema)
Expand Down

0 comments on commit e4aee72

Please sign in to comment.