tachybase_todo/packages/plugins/sequence-field/src/client/index.tsx
Junyi e3e352ffeb
refactor(sequence-field): move to plugin and use table to record (#1209)
* refactor(sequence-field): move to plugin and use table to record

* fix(database): skip test case which not in core

* fix(plugin-sequence): add migration

* fix(plugin-sequence): fix types

* test(plugin-sequence): fix test cases

* fix(plugin-sequence): fix configuration ui

* fix(plugin-sequence): fix merge

* fix(plugin-sequence): fix schema and error message
2022-12-16 01:04:22 -08:00

24 lines
651 B
TypeScript

import React, { useContext } from 'react';
import { registerField, CollectionManagerContext, SchemaComponentOptions } from '@nocobase/client';
import { RuleConfigForm, sequence } from './sequence';
registerField(sequence.group, 'sequence', sequence);
export default function (props) {
const ctx = useContext(CollectionManagerContext);
return (
<SchemaComponentOptions
components={{
RuleConfigForm,
}}
>
<CollectionManagerContext.Provider value={{ ...ctx, interfaces: { ...ctx.interfaces, sequence } }}>
{props.children}
</CollectionManagerContext.Provider>
</SchemaComponentOptions>
);
}