mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:55:33 +00:00
fix: missing options when finding
This commit is contained in:
parent
2828a82f7d
commit
f948896365
@ -143,6 +143,7 @@ describe('collection hooks', () => {
|
||||
});
|
||||
|
||||
expect(createdField.body).toMatchObject({
|
||||
...types['string'].options,
|
||||
...{
|
||||
interface: 'string',
|
||||
title: '名称',
|
||||
@ -152,7 +153,6 @@ describe('collection hooks', () => {
|
||||
sortable: true,
|
||||
filterable: true,
|
||||
},
|
||||
...types['string'].options,
|
||||
sort: 1,
|
||||
collection_name: 'tests',
|
||||
});
|
||||
|
@ -14,7 +14,8 @@ export class FieldModel extends BaseModel {
|
||||
constructor(values: any = {}, options: any = {}) {
|
||||
let data = {
|
||||
...(values.options||{}),
|
||||
..._.omit(values, 'options'),
|
||||
...values,
|
||||
// ..._.omit(values, 'options'),
|
||||
};
|
||||
const interfaceType = data.interface;
|
||||
if (interfaceType) {
|
||||
@ -25,6 +26,7 @@ export class FieldModel extends BaseModel {
|
||||
}
|
||||
// @ts-ignore
|
||||
super(data, options);
|
||||
// console.log(data);
|
||||
}
|
||||
|
||||
generateName() {
|
||||
|
Loading…
Reference in New Issue
Block a user