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
|
||||
|
@ -24,4 +25,4 @@ export class CustomAutocompleteEditor extends Handsontable.editors.AutocompleteE
|
|||
isCellNumeric() {
|
||||
return this.cellProperties?.className?.includes('htNumeric')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,4 +18,4 @@ In any case, you must not make any such use of this software as to develop softw
|
|||
UNLESS EXPRESSLY AGREED OTHERWISE, 4GL APPS PROVIDES THIS SOFTWARE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO LEGAL THEORY, SHALL 4GL APPS BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM USE OR INABILITY TO USE THIS SOFTWARE.
|
||||
|
||||
|
||||
`
|
||||
`
|
||||
|
|
Loading…
Reference in New Issue
Block a user