Web: Files: SelectFileDialog/SelectFileInput: Added custom header.
This commit is contained in:
parent
996e1d6086
commit
c9665cf692
@ -31,6 +31,7 @@ const SelectFileDialogAsideView = ({
|
||||
loadNextPage,
|
||||
selectedFolder,
|
||||
iconUrl,
|
||||
header,
|
||||
}) => {
|
||||
console.log("isLoadingData", isLoadingData, "selectedFolder", selectedFolder);
|
||||
return (
|
||||
@ -48,7 +49,7 @@ const SelectFileDialogAsideView = ({
|
||||
size="medium"
|
||||
className="select-file-dialog_aside-header_title"
|
||||
>
|
||||
{t("SelectFile")}
|
||||
{header ? header : t("SelectFile")}
|
||||
</Heading>
|
||||
</StyledHeaderContent>
|
||||
|
||||
|
@ -141,7 +141,7 @@ const FilesListBody = ({
|
||||
);
|
||||
};
|
||||
FilesListBody.defaultProps = {
|
||||
listHeight: 320,
|
||||
listHeight: 300,
|
||||
};
|
||||
export default inject(({ auth }) => {
|
||||
const { user } = auth.userStore;
|
||||
|
@ -172,6 +172,7 @@ class SelectFileDialogBody extends React.Component {
|
||||
isCommonWithoutProvider,
|
||||
iconUrl,
|
||||
folderId,
|
||||
header,
|
||||
} = this.props;
|
||||
const {
|
||||
isVisible,
|
||||
@ -205,6 +206,7 @@ class SelectFileDialogBody extends React.Component {
|
||||
loadNextPage={this.loadNextPage}
|
||||
selectedFolder={selectedFolder}
|
||||
iconUrl={iconUrl}
|
||||
header={header}
|
||||
/>
|
||||
) : (
|
||||
<SelectFileDialogModalView
|
||||
@ -225,6 +227,7 @@ class SelectFileDialogBody extends React.Component {
|
||||
iconUrl={iconUrl}
|
||||
selectedKeys={selectedKeys}
|
||||
folderId={folderId}
|
||||
header={header}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -100,6 +100,7 @@ class SelectFileDialogModalViewBody extends React.Component {
|
||||
iconUrl,
|
||||
selectedKeys,
|
||||
folderId,
|
||||
header,
|
||||
} = this.props;
|
||||
const { isLoading } = this.state;
|
||||
console.log("selectedKeys", selectedKeys);
|
||||
@ -113,7 +114,9 @@ class SelectFileDialogModalViewBody extends React.Component {
|
||||
style={{ maxWidth: "890px" }}
|
||||
displayType="modal"
|
||||
>
|
||||
<ModalDialog.Header>{t("SelectFile")}</ModalDialog.Header>
|
||||
<ModalDialog.Header>
|
||||
{header ? header : t("SelectFile")}
|
||||
</ModalDialog.Header>
|
||||
<ModalDialog.Body className="select-file_body-modal-dialog">
|
||||
<StyledSelectFilePanel>
|
||||
{!isLoading ? (
|
||||
|
@ -43,6 +43,7 @@ class SelectFile extends React.PureComponent {
|
||||
withSubfolders,
|
||||
onSelectFile,
|
||||
folderId,
|
||||
header,
|
||||
} = this.props;
|
||||
const { isLoading, fileName } = this.state;
|
||||
const zIndex = 310;
|
||||
@ -71,6 +72,7 @@ class SelectFile extends React.PureComponent {
|
||||
filterType={filterType}
|
||||
onSelectFile={onSelectFile}
|
||||
folderId={folderId}
|
||||
header={header}
|
||||
/>
|
||||
</StyledComponent>
|
||||
);
|
||||
|
@ -565,6 +565,7 @@ const StyledSelectFilePanel = styled.div`
|
||||
display: grid;
|
||||
grid-template-columns: 240px 1fr;
|
||||
height: 300px;
|
||||
grid-gap: 8px;
|
||||
.modal-dialog_tree-body {
|
||||
padding-top: 16px;
|
||||
border-right: 1px solid #dee2e6;
|
||||
|
Loading…
Reference in New Issue
Block a user