Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Tabulator checkbox selection #2931

Merged
merged 1 commit into from
Nov 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions panel/models/tabulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -862,12 +862,12 @@ export class DataTabulatorView extends PanelHTMLBoxView {
}

rowSelectionChanged(data: any, _: any): void {
if (this._selection_updating || this._initializing || (typeof this.model.select_mode) === 'boolean' || (typeof this.model.select_mode) === 'number' || this.model.select_mode.startsWith('checkbox') || this.model.configuration.dataTree)
if (this._selection_updating || this._initializing || (typeof this.model.select_mode) === 'boolean' || (typeof this.model.select_mode) === 'number' || this.model.configuration.dataTree)
return
const indices: number[] = data.map((row: any) => row._index)
const filtered = this._filter_selected(indices)
this._selection_updating = indices.length === filtered.length
this.model.source.selected.indices = filtered;
this.model.source.selected.indices = filtered
this._selection_updating = false
}

Expand Down