Merge branch 'feature/fix-hide/show-header' of github.com:ONLYOFFICE/AppServer into feature/fix-hide/show-header

# Conflicts:
#	web/ASC.Web.Common/src/components/PageLayout/index.js
This commit is contained in:
Artem Tarasov 2021-01-18 10:49:49 +03:00
commit d965160918
3 changed files with 13 additions and 10 deletions

View File

@ -255,12 +255,14 @@ class SectionBodyContent extends React.Component {
// }
componentDidUpdate(prevProps) {
if (this.props.isTabletView) {
if (this.props.folderId !== prevProps.folderId) {
const { isTabletView, folderId, filter } = this.props;
if (isTabletView) {
if (folderId !== prevProps.folderId) {
this.customScrollElm && this.customScrollElm.scrollTo(0, 0);
}
if (this.props.filter.page !== prevProps.filter.page)
if (filter.page !== prevProps.filter.page)
this.isScrollUpOnTheNextPage = true;
if (this.isScrollUpOnTheNextPage) {
this.customScrollElm && this.customScrollElm.scrollTo(0, 0);
@ -1711,7 +1713,6 @@ class SectionBodyContent extends React.Component {
isVersionHistoryPanel,
history,
} = this.props;
console.log("Files Home SectionBodyContent render", this.props);
const { editingId, showMoveToPanel, showCopyPanel } = this.state;

View File

@ -80,20 +80,22 @@ class PureHome extends React.Component {
);
}
componentDidUpdate(prevProps) {
if (this.props.selection !== prevProps.selection) {
const { selection, isLoading, isTabletView, filter } = this.props;
if (selection !== prevProps.selection) {
this.renderGroupButtonMenu();
}
if (this.props.isLoading !== prevProps.isLoading) {
if (this.props.isLoading) {
if (isLoading !== prevProps.isLoading) {
if (isLoading) {
utils.showLoader();
} else {
utils.hideLoader();
}
}
if (this.props.isTabletView) {
if (this.props.filter.page !== prevProps.filter.page)
if (isTabletView) {
if (filter.page !== prevProps.filter.page)
this.isScrollUpOnTheNextPage = true;
if (this.isScrollUpOnTheNextPage) {
this.customScrollElm && this.customScrollElm.scrollTo(0, 0);

View File

@ -332,7 +332,7 @@ class PageLayoutComponent extends React.Component {
uploadFiles={uploadFiles}
setSelections={setSelections}
withScroll={withBodyScroll}
autoFocus={isTabletView}
autoFocus={!isTabletView}
pinned={this.state.isArticlePinned}
viewAs={viewAs}
>