fix: actionSchemaToolbar support x-toolbar-props (#4286)

* fix: actionSchemaToolbar support x-toolbar-props

* fix: bug
This commit is contained in:
katherinehhh 2024-05-08 15:36:54 +08:00 committed by GitHub
parent f1923d25cd
commit 3074dbcb67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,9 +7,19 @@
* For more information, please refer to: https://www.nocobase.com/agreement.
*/
import { useFieldSchema } from '@formily/react';
import React from 'react';
import { SchemaToolbar } from '../../schema-settings/GeneralSchemaDesigner';
export const ActionSchemaToolbar = (props) => {
return <SchemaToolbar initializer={false} showBorder={false} showBackground {...props} />;
const fieldSchema = useFieldSchema();
return (
<SchemaToolbar
initializer={false}
showBorder={false}
showBackground
{...props}
{...fieldSchema['x-toolbar-props']}
/>
);
};