Shared: Selectors: Added return new field.
This commit is contained in:
parent
02fb8738ce
commit
5feca2b857
@ -97,7 +97,8 @@ export const convertFilesToItems: (
|
||||
filterParam?: string,
|
||||
) => {
|
||||
const items = files.map((file) => {
|
||||
const { id, title, security, folderId, rootFolderType, fileExst } = file;
|
||||
const { id, title, security, folderId, rootFolderType, fileExst, viewUrl } =
|
||||
file;
|
||||
|
||||
const icon = getIcon(fileExst || DEFAULT_FILE_EXTS);
|
||||
const label = title.replace(fileExst, "") || fileExst;
|
||||
@ -112,6 +113,7 @@ export const convertFilesToItems: (
|
||||
rootFolderType,
|
||||
isDisabled: !filterParam,
|
||||
fileExst,
|
||||
viewUrl,
|
||||
};
|
||||
});
|
||||
return items;
|
||||
|
@ -127,6 +127,7 @@ const FilesSelector = ({
|
||||
title: string;
|
||||
path?: string[];
|
||||
fileExst?: string;
|
||||
viewUrl?: string;
|
||||
inPublic?: boolean;
|
||||
} | null>(null);
|
||||
const [total, setTotal] = React.useState<number>(0);
|
||||
@ -261,6 +262,7 @@ const FilesSelector = ({
|
||||
id: item.id,
|
||||
title: item.label,
|
||||
fileExst: item.fileExst,
|
||||
viewUrl: item.viewUrl,
|
||||
inPublic,
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user