mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 08:53:14 +00:00
close detail when open setting panel
This commit is contained in:
@@ -25,6 +25,7 @@ const propTypes = {
|
||||
sortItems: PropTypes.func,
|
||||
viewId: PropTypes.string,
|
||||
onToggleDetail: PropTypes.func,
|
||||
onCloseDetail: PropTypes.func,
|
||||
};
|
||||
|
||||
class DirTool extends React.Component {
|
||||
@@ -94,7 +95,7 @@ class DirTool extends React.Component {
|
||||
render() {
|
||||
const menuItems = this.getMenu();
|
||||
const { isDropdownMenuOpen } = this.state;
|
||||
const { repoID, currentMode, currentPath, sortBy, sortOrder, viewId, isCustomPermission, onToggleDetail } = this.props;
|
||||
const { repoID, currentMode, currentPath, sortBy, sortOrder, viewId, isCustomPermission, onToggleDetail, onCloseDetail } = this.props;
|
||||
const propertiesText = TextTranslation.PROPERTIES.value;
|
||||
const isFileExtended = currentPath.startsWith('/' + PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES + '/');
|
||||
const isTagView = currentPath.startsWith('/' + PRIVATE_FILE_TYPE.TAGS_PROPERTIES + '/');
|
||||
@@ -106,6 +107,7 @@ class DirTool extends React.Component {
|
||||
viewId={viewId}
|
||||
isCustomPermission={isCustomPermission}
|
||||
onToggleDetail={onToggleDetail}
|
||||
onCloseDetail={onCloseDetail}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
@@ -9,7 +9,7 @@ import MapViewToolBar from './map-view-toolbar';
|
||||
|
||||
import './index.css';
|
||||
|
||||
const ViewToolBar = ({ viewId, isCustomPermission, onToggleDetail }) => {
|
||||
const ViewToolBar = ({ viewId, isCustomPermission, onToggleDetail, onCloseDetail }) => {
|
||||
const [view, setView] = useState(null);
|
||||
const [collaborators, setCollaborators] = useState([]);
|
||||
|
||||
@@ -108,6 +108,7 @@ const ViewToolBar = ({ viewId, isCustomPermission, onToggleDetail }) => {
|
||||
modifyFilters={modifyFilters}
|
||||
modifySorts={modifySorts}
|
||||
onToggleDetail={onToggleDetail}
|
||||
onCloseDetail={onCloseDetail}
|
||||
/>
|
||||
)}
|
||||
{viewType === VIEW_TYPE.MAP && (
|
||||
@@ -126,6 +127,7 @@ ViewToolBar.propTypes = {
|
||||
viewId: PropTypes.string,
|
||||
isCustomPermission: PropTypes.bool,
|
||||
onToggleDetail: PropTypes.func,
|
||||
onCloseDetail: PropTypes.func,
|
||||
};
|
||||
|
||||
export default ViewToolBar;
|
||||
|
@@ -13,6 +13,7 @@ const KanbanViewToolBar = ({
|
||||
modifyFilters,
|
||||
modifySorts,
|
||||
onToggleDetail,
|
||||
onCloseDetail,
|
||||
}) => {
|
||||
const viewType = useMemo(() => view.type, [view]);
|
||||
const viewColumns = useMemo(() => {
|
||||
@@ -25,7 +26,7 @@ const KanbanViewToolBar = ({
|
||||
}, [viewColumns]);
|
||||
|
||||
const onToggleKanbanSetting = () => {
|
||||
onToggleDetail();
|
||||
onCloseDetail();
|
||||
window.sfMetadataContext.eventBus.dispatch(EVENT_BUS_TYPE.TOGGLE_KANBAN_SETTINGS);
|
||||
};
|
||||
|
||||
@@ -89,6 +90,7 @@ KanbanViewToolBar.propTypes = {
|
||||
modifyFilters: PropTypes.func,
|
||||
modifySorts: PropTypes.func,
|
||||
onToggleDetail: PropTypes.func,
|
||||
onCloseDetail: PropTypes.func,
|
||||
};
|
||||
|
||||
export default KanbanViewToolBar;
|
||||
|
@@ -2310,6 +2310,7 @@ class LibContentView extends React.Component {
|
||||
viewId={this.state.viewId}
|
||||
viewType={this.props.viewType}
|
||||
onToggleDetail={this.toggleDirentDetail}
|
||||
onCloseDetail={this.closeDirentDetail}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
Reference in New Issue
Block a user