Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (checkboxSelector != null)
this.grid.registerPlugin(checkboxSelector)
const pluginOptions = {
dataItemColumnValueExtractor(val: Item, col: TableColumn) {
// As defined in this file, Item can contain any type values
let value: any = val[col.field]
if (isString(value)) {
value = value.replace(/\n/g, "\\n")
}
return value
},
includeHeaderWhenCopying: false,
}
this.grid.registerPlugin(new CellExternalCopyManager(pluginOptions))
this.grid.onSelectedRowsChanged.subscribe((_event: any, args: any) => {
if (this._in_selection_update) {
return
}
this.model.source.selected.indices = args.rows.map((i: number) => this.data.index[i])
})
this.updateSelection()
if (!this.model.header_row) {
this._hide_header()
}
}
}