fix(plugin-cm): fix interfaces injection and getter (#1196)
This commit is contained in:
parent
d1a6aeec76
commit
e5f5a2a0c5
@ -17,7 +17,7 @@ export const CollectionManagerProvider: React.FC<CollectionManagerOptions> = (pr
|
|||||||
value={{
|
value={{
|
||||||
...ctx,
|
...ctx,
|
||||||
service,
|
service,
|
||||||
interfaces: { ...defaultInterfaces, ...interfaces },
|
interfaces: { ...defaultInterfaces, ...ctx.interfaces, ...interfaces },
|
||||||
templates: { ...defaultTemplates, ...templates },
|
templates: { ...defaultTemplates, ...templates },
|
||||||
collections,
|
collections,
|
||||||
refreshCM,
|
refreshCM,
|
||||||
|
@ -14,7 +14,7 @@ import { useCollectionManager } from '../hooks';
|
|||||||
import { IField } from '../interfaces/types';
|
import { IField } from '../interfaces/types';
|
||||||
import { useResourceActionContext, useResourceContext } from '../ResourceActionProvider';
|
import { useResourceActionContext, useResourceContext } from '../ResourceActionProvider';
|
||||||
import * as components from './components';
|
import * as components from './components';
|
||||||
import { options } from './interfaces';
|
import { getOptions } from './interfaces';
|
||||||
|
|
||||||
const getSchema = (schema: IField, record: any, compile) => {
|
const getSchema = (schema: IField, record: any, compile) => {
|
||||||
if (!schema) {
|
if (!schema) {
|
||||||
@ -152,7 +152,7 @@ export const AddFieldAction = (props) => {
|
|||||||
const { availableFieldInterfaces } = getTemplate(record.template) || {};
|
const { availableFieldInterfaces } = getTemplate(record.template) || {};
|
||||||
const { exclude, include } = availableFieldInterfaces || {};
|
const { exclude, include } = availableFieldInterfaces || {};
|
||||||
const optionArr = [];
|
const optionArr = [];
|
||||||
options.forEach((v) => {
|
getOptions().forEach((v) => {
|
||||||
if (v.key === 'systemInfo') {
|
if (v.key === 'systemInfo') {
|
||||||
optionArr.push({
|
optionArr.push({
|
||||||
...v,
|
...v,
|
||||||
|
Loading…
Reference in New Issue
Block a user