Skip to content

autoRefresh button active state does not work #8123

@rohime

Description

@rohime

Bootstraptable version(s) affected

1.26.0

Description

In version >=1.24.1 the autoRefresh button is never shown as active.

Example(s)

The official autoRefresh extension example does not work: https://examples.bootstrap-table.com/template.html?v=971&url=extensions/auto-refresh.html

Possible Solutions

Before c048f9d the autoRefresh button used to have the class .auto-refresh. That is still expected in the selector here:

toggleAutoRefresh () {
if (this.options.autoRefresh) {
if (this.options.autoRefreshStatus) {
clearInterval(this.options.autoRefreshFunction)
this.$toolbar.find('>.columns .auto-refresh')
.removeClass(this.constants.classes.buttonActive)
} else {
this.setupRefreshInterval()
this.$toolbar.find('>.columns .auto-refresh')
.addClass(this.constants.classes.buttonActive)
}
this.options.autoRefreshStatus = !this.options.autoRefreshStatus
}
}

Therefore either the .auto-refresh class must be added again or the selectors must be updated (maybe '>.columns [name="autoRefresh"]'?).

Additional Context

No response

Metadata

Metadata

Assignees

Labels

BugIssues which are marked as Bugauto refreshconfirmedIssues that have been confirmed with a reduced test case and identify a bug.extensionIssues for adding or updating our extension.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions