Skip to content

API Documentation: 'getRuleFilterTemplate' should be 'getRuleFilterSelect' #548

@ghost

Description

I created a new plugin called "condition-ids" which injects an element from rule.data into the html for the filter. The following code snippet didn't work until I changed 'getRuleFilterTemplate' to 'getRuleFilterSelect'.

$("#my-query-builder").queryBuilder.define("condition-ids", function () {
    this.on("getRuleFilterTemplate.filter", (h, rule) => {
        if (rule !== undefined && rule.data !== undefined) {
            var $h = $(h.value);
            $h.attr("data-condition-id", rule.data.conditionid);
            h.value = $h.prop("outerHTML");
        }
    });
});

Please update the API documentation to show that 'changer:getRuleFilterSelect' is the correct name of the changer triggered by 'createRuleFilters', not 'changer:getRuleFilterTemplate'.

http://querybuilder.js.org/api/QueryBuilder.html#.event:changer:getRuleFilterTemplate

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationIssue or PR in the gh-pages branch

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions