mirror of
https://github.com/nocobase/nocobase.git
synced 2026-09-24 16:02:20 +08:00
Merge branch 'next' into develop
This commit is contained in:
@@ -29,7 +29,7 @@ export const useLinkageCollectionFieldOptions = (collectionName: string, readPre
|
||||
{ label: t('Value'), value: ActionType.Value, selected: false, schema: {} },
|
||||
].filter((v) => {
|
||||
if (readPretty) {
|
||||
return [ActionType.Visible, ActionType.None].includes(v.value);
|
||||
return [ActionType.Visible, ActionType.None, ActionType.Hidden].includes(v.value);
|
||||
}
|
||||
return v;
|
||||
});
|
||||
|
||||
@@ -103,6 +103,8 @@ export interface CollectionOptions extends Omit<ModelOptions, 'name' | 'hooks'>
|
||||
isThrough?: boolean;
|
||||
filterTargetKey?: string | string[];
|
||||
fields?: FieldOptions[];
|
||||
fieldSort?: string[];
|
||||
|
||||
model?: string | ModelStatic<Model>;
|
||||
repository?: string | RepositoryType;
|
||||
sortable?: CollectionSortable;
|
||||
|
||||
@@ -47,7 +47,10 @@ export class FieldModel extends MagicAttributeModel {
|
||||
|
||||
const field = await (async () => {
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
return collection.setField(name, options);
|
||||
return collection.setField(name, {
|
||||
...options,
|
||||
__sort: this.get('sort'),
|
||||
});
|
||||
})();
|
||||
|
||||
await this.db.emitAsync('field:loaded', {
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ export default {
|
||||
...field.options,
|
||||
};
|
||||
}),
|
||||
'sort',
|
||||
'__sort',
|
||||
);
|
||||
|
||||
results.push(obj);
|
||||
|
||||
Reference in New Issue
Block a user