1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 19:08:21 +00:00

Change dir others content (#6320)

* change dir others content

* optimise css codes

* remove this.refs

* lib-others always show repo trashUrl
This commit is contained in:
Michael An
2024-07-09 21:45:51 +08:00
committed by GitHub
parent 2a312e02fe
commit a378b243e6
5 changed files with 25 additions and 14 deletions

View File

@@ -86,6 +86,7 @@ class DirColumnView extends React.Component {
this.containerWidth = null;
this.resizeRef = null;
this.dragHandler = null;
this.viewModeContainer = React.createRef();
}
onResizeMouseUp = () => {
@@ -98,7 +99,7 @@ class DirColumnView extends React.Component {
};
onResizeMouseDown = () => {
this.containerWidth = this.refs.viewModeContainer.clientWidth;
this.containerWidth = this.viewModeContainer.current.clientWidth;
this.setState({
inResizing: true
});
@@ -172,7 +173,7 @@ class DirColumnView extends React.Component {
const select = inResizing ? 'none' : '';
const mainFlex = '1 0 ' + (1 - navRate) * 100 + '%';
return (
<div className="dir-column-view" onMouseMove={onResizeMove} onMouseUp={this.onResizeMouseUp} ref="viewModeContainer">
<div className="dir-column-view" onMouseMove={onResizeMove} onMouseUp={this.onResizeMouseUp} ref={this.viewModeContainer}>
{isTreePanelShown && (
<>
<DirColumnNav