[DE PE SSE] Fix render FilterOptionsController and refactoring
This commit is contained in:
parent
21e84003c4
commit
858c2e2483
|
@ -150,9 +150,7 @@ class MainPage extends Component {
|
|||
!this.state.collaborationVisible ? null :
|
||||
<Collaboration onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} page={this.state.collaborationPage} />
|
||||
}
|
||||
{!appOptions.isDocReady ? null :
|
||||
<ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} />
|
||||
}
|
||||
{appOptions.isDocReady && <ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} /> }
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -142,9 +142,7 @@ class MainPage extends Component {
|
|||
!this.state.collaborationVisible ? null :
|
||||
<CollaborationView onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} />
|
||||
}
|
||||
{!appOptions.isDocReady ? null :
|
||||
<ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} />
|
||||
}
|
||||
{appOptions.isDocReady && <ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} />}
|
||||
|
||||
</Page>
|
||||
</Fragment>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import React, { useEffect,useRef,useState } from 'react';
|
||||
import React, { memo, useEffect,useRef,useState } from 'react';
|
||||
import FilterView from '../../src/view/FilterOptions';
|
||||
import { f7,Sheet,Popover } from 'framework7-react';
|
||||
import { Device } from '../../../../common/mobile/utils/device';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const FilterOptionsController = () => {
|
||||
const FilterOptionsController = memo( () => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('View.Edit', {returnObjects: true});
|
||||
const configRef = useRef();
|
||||
|
@ -126,6 +126,6 @@ const FilterOptionsController = () => {
|
|||
<FilterView onSort={onSort} listVal={listVal} checkSort={checkSort} isValid={isValid} onUpdateCell={onUpdateCell}
|
||||
onDeleteFilter={onDeleteFilter} onClearFilter={onClearFilter}/>
|
||||
)
|
||||
};
|
||||
});
|
||||
|
||||
export default FilterOptionsController;
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Component } from 'react';
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import { Page, View, Navbar, Subnavbar, Icon } from 'framework7-react';
|
||||
import { observer, inject } from "mobx-react";
|
||||
import { Device } from '../../../../common/mobile/utils/device';
|
||||
|
@ -130,17 +130,16 @@ class MainPage extends Component {
|
|||
<CollaborationView onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} />
|
||||
}
|
||||
|
||||
{!appOptions.isDocReady ? null :
|
||||
<>
|
||||
{appOptions.isDocReady &&
|
||||
<Fragment key='filter-context'>
|
||||
<FilterOptionsController />
|
||||
<ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} />
|
||||
</>
|
||||
</Fragment>
|
||||
}
|
||||
|
||||
<Statusbar />
|
||||
|
||||
<FunctionGroups /> {/* hidden component*/}
|
||||
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue