Fix record list autorefresh edge case
This commit is contained in:
@@ -1034,7 +1034,7 @@ export default {
|
||||
|
||||
created () {
|
||||
if (!this.inlineEditing) {
|
||||
this.refreshBlock(this.refresh)
|
||||
this.refreshBlock(this.refresh, false, true)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1486,7 +1486,7 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
refresh (resetPagination = false, checkSelected = true) {
|
||||
refresh (resetPagination = false, checkSelected = false) {
|
||||
// Prevent refresh if records are selected or inline editing
|
||||
if (checkSelected && (this.selected.length || this.inlineEdit.recordIDs.length)) return
|
||||
|
||||
|
||||
@@ -101,11 +101,11 @@ export default {
|
||||
* If reloading data does not refresh the page block
|
||||
* You should attach :key="key" to it and increment it in the refreshFunction
|
||||
*/
|
||||
refreshBlock (refreshFunction) {
|
||||
refreshBlock (refreshFunction, ...params) {
|
||||
if (!this.autoRefreshEnabled || this.refreshInterval) return
|
||||
|
||||
const interval = setInterval(() => {
|
||||
refreshFunction()
|
||||
refreshFunction(...params)
|
||||
}, this.options.refreshRate * 1000)
|
||||
|
||||
this.refreshInterval = interval
|
||||
|
||||
Reference in New Issue
Block a user