Closed robertrachita closed 2 months ago
I get this error in my TypeScript project whenever I try to define a custom validation for a filter.
For instance, this also happens with this minimal callback function:
{ id: 'test', label: 'test', type: 'double', operators: ['equal', 'not_equal', 'less'], validation: { callback: function(value: string, rule: any) { console.log(value); return true; } } }
Stacktrace: Utils.fmt
QueryBuilder.prototype.updateError
update
dispatc
add/v.handle
trigger
triggerHandler
set
QueryBuilder.prototype.triggerValidationError
QueryBuilder.prototype.validate
solved it by declaring the query builder div element beforehand as any const queryBuilderElement: any = $('#query-builder');
const queryBuilderElement: any = $('#query-builder');
I get this error in my TypeScript project whenever I try to define a custom validation for a filter.
For instance, this also happens with this minimal callback function:
Stacktrace: Utils.fmt
QueryBuilder.prototype.updateError
update
dispatc
add/v.handle
trigger
triggerHandler
trigger
set
QueryBuilder.prototype.triggerValidationError
QueryBuilder.prototype.validate