This commit is contained in:
parent
963562621d
commit
ace599b39f
|
@ -55,7 +55,10 @@ export class DcValidator {
|
|||
}
|
||||
|
||||
registerCustomEditors() {
|
||||
Handsontable.editors.registerEditor('autocomplete.custom', CustomAutocompleteEditor)
|
||||
Handsontable.editors.registerEditor(
|
||||
'autocomplete.custom',
|
||||
CustomAutocompleteEditor
|
||||
)
|
||||
}
|
||||
|
||||
getRules(): DcValidation[] {
|
||||
|
@ -323,7 +326,10 @@ export class DcValidator {
|
|||
|
||||
// Because of dynamic cell validation, that will change the type of cell to dropdown
|
||||
// `rules[i].colType` could be different type (eg. numeric). So we check if current cell is dropdown, to call HOT native dropdown validator
|
||||
if (this.editor === 'autocomplete' || this.editor === 'autocomplete.custom') {
|
||||
if (
|
||||
this.editor === 'autocomplete' ||
|
||||
this.editor === 'autocomplete.custom'
|
||||
) {
|
||||
self
|
||||
.getHandsontableValidator('autocomplete')
|
||||
.call(this, value, (valid: boolean) => {
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import Handsontable from "handsontable";
|
||||
import Core from "handsontable/core";
|
||||
import Handsontable from 'handsontable'
|
||||
import Core from 'handsontable/core'
|
||||
|
||||
export class CustomAutocompleteEditor extends Handsontable.editors.AutocompleteEditor {
|
||||
export class CustomAutocompleteEditor extends Handsontable.editors
|
||||
.AutocompleteEditor {
|
||||
constructor(instance: Core) {
|
||||
super(instance);
|
||||
super(instance)
|
||||
}
|
||||
|
||||
createElements() {
|
||||
super.createElements();
|
||||
super.createElements()
|
||||
}
|
||||
|
||||
// Listbox open
|
||||
|
|
Loading…
Reference in New Issue
Block a user