Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render(): void {
let checkboxSelector
let columns = this.model.columns.map((column) => column.toColumn())
if (this.model.selectable == "checkbox") {
checkboxSelector = new CheckboxSelectColumn({cssClass: "bk-cell-select"})
columns.unshift(checkboxSelector.getColumnDefinition())
}
if (this.model.index_position != null) {
const index_position = this.model.index_position
const index = this.newIndexColumn()
// This is to be able to provide negative index behaviour that
// matches what python users will expect
if (index_position == -1) {
columns.push(index)
}
else if (index_position < -1) {
columns.splice(index_position+1, 0, index)
}
else {
columns.splice(index_position, 0, index)
render(): void {
let checkboxSelector
let columns = this.model.columns.map((column) => column.toColumn())
if (this.model.selectable == "checkbox") {
checkboxSelector = new CheckboxSelectColumn({cssClass: bk_cell_select})
columns.unshift(checkboxSelector.getColumnDefinition())
}
if (this.model.index_position != null) {
const index_position = this.model.index_position
const index = this.newIndexColumn()
// This is to be able to provide negative index behaviour that
// matches what python users will expect
if (index_position == -1)
columns.push(index)
else if (index_position < -1)
columns.splice(index_position+1, 0, index)
else
columns.splice(index_position, 0, index)
}