Files
dc/client/src/app/shared/dc-validator/editors/numericAutocomplete.ts
Mihajlo Medjedovic ace599b39f
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 46s
style: lint
2024-03-19 10:01:30 +01:00

29 lines
622 B
TypeScript

import Handsontable from 'handsontable'
import Core from 'handsontable/core'
export class CustomAutocompleteEditor extends Handsontable.editors
.AutocompleteEditor {
constructor(instance: Core) {
super(instance)
}
createElements() {
super.createElements()
}
// Listbox open
open(event?: Event | undefined): void {
super.open(event)
if (this.isCellNumeric()) {
this.htContainer.classList.add('numericListbox')
} else {
this.htContainer.classList.remove('numericListbox')
}
}
isCellNumeric() {
return this.cellProperties?.className?.includes('htNumeric')
}
}