Commit be64a216 by zhaochengxiang

方块图滚动问题

parent ecc353d7
......@@ -174,35 +174,54 @@ class MapContent extends React.Component {
isRowLoaded = ({ index }) => !!this.loadedRowsMap[index];
onSquareItemClick = (item) => {
const { breadcrumbContents } = this.state;
this.loadedRowsMap = {};
this.setState({ breadcrumbContents: [...breadcrumbContents, { name: item.dirName || '', data: item }] }, () => {
dispatchLatest({
type: 'map.getTableModelByDirIid',
payload: { dirId: item.dirId },
payload: {
dirId: item.dirId,
topNum: defaultLoadCount
},
callback: data => {
this.convertRemoteData(data || [], item.id, item.dirId);
item.children = (data || []).filter(item => item.dbType!=='More');
this.setSquareGraphState(item);
this.setState({
curTableModelData: item.children || [],
haveMoreData: (item.children||[]).length===defaultLoadCount,
});
}
})
})
}
onBreadcrumbItemClick = (content, index) => {
const { breadcrumbContents } = this.state;
this.loadedRowsMap = {};
this.setState({
breadcrumbContents: breadcrumbContents.splice(0, index === 0 ? 1 : (index + 1)),
}, () => {
const item = content.data;
dispatchLatest({
type: 'map.getTableModelByDirIid',
payload: { dirId: item.dirId },
payload: {
dirId: item.dirId,
topNum: defaultLoadCount
},
callback: data => {
this.convertRemoteData(data || [], item.id, item.dirId);
item.children = (data || []).filter(item => item.dbType!=='More');
this.loadedRowsMap = {};
this.setState({
curTableModelData: item.children || [],
haveMoreData: (item.children||[]).length===defaultLoadCount,
});
}
})
......
......@@ -239,7 +239,7 @@ class Model extends React.Component {
<Space>
<span>模型搜索:</span>
<Input
placeholder="请输入模型名称或者文名称"
placeholder="请输入模型名称或者文名称"
allowClear
value={keyword}
onChange={this.onSearchInputChange}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment