mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:28:37 +08:00
CRUD 一次性加载逻辑优化
This commit is contained in:
parent
f62a7a20d0
commit
ea52e58ceb
@ -630,6 +630,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||
this.search(
|
||||
dialogAction.__from ? {[pageField || 'page']: 1} : undefined,
|
||||
undefined,
|
||||
true,
|
||||
true
|
||||
);
|
||||
} else if (
|
||||
@ -757,7 +758,15 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||
evalExpression(stopAutoRefreshWhen, data)
|
||||
)) &&
|
||||
(this.timer = setTimeout(
|
||||
silentPolling ? this.silentSearch : this.search,
|
||||
silentPolling
|
||||
? this.silentSearch.bind(this, undefined, undefined, true)
|
||||
: this.search.bind(
|
||||
this,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
true
|
||||
),
|
||||
Math.max(interval, 3000)
|
||||
));
|
||||
return value;
|
||||
@ -765,8 +774,8 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||
: source && store.initFromScope(data, source);
|
||||
}
|
||||
|
||||
silentSearch(values?: object) {
|
||||
return this.search(values, true);
|
||||
silentSearch(values?: object, clearSelection?: boolean, forceReload = false) {
|
||||
return this.search(values, true, clearSelection, forceReload);
|
||||
}
|
||||
|
||||
handleChangePage(page: number, perPage?: number) {
|
||||
|
Loading…
Reference in New Issue
Block a user