Error message in 6.x 'Filter doesn't exists for column in question'

edited January 22 in Technical questions

My app worked until 5.x versions. Now (Webix 6.x) showing a datatable hundreds of messages appear 'Filter doesn't exists for column in question'

What might it be? How could it be fixed or suppressed?

Comments

  • After look into browser console I found out that error occurs on

    pDataTable.eachColumn(function (pCol) {
    var f = this.getFilter(pCol);
    }

    for that columns, that do not have a filter.

    First: Is there a way to find out if a column has a filter without generating an error?

    In 5.x i did suppress the error message by this 'hack':

    __webixAssert = webix.assert;
    webix.assert = myAssert;

    myAssert was a function that filtered out that message.

    Now from 6.x Webix code is completely redesigned.

    How can I do this now?

  • Hi Chris,

    Indeed, for the described case the asserting message is not necessary and is rather annoying. At the same time, there isn't any public method to check filter existence exept for iterating headers in grid.config.columns.

    Unfortunately, from 6.0 these's no publis access to webix.assert function.

    Also, please note that we have renamed the source files and the "webix.js" file now contains the non-compressed (debug) version of Webix while the minified code (withour asserts messages) has moved to "webix.min.js".

  • Thanks for your comments.

    Would be nice if a solution will be found in next PRO update: either no assert message in this case or a hasFilter() method or similar.

    Would also be nice if there was a chance to override the assert for similar purposes. maybe you could create a webix.customAssert ;-)

  • either no assert message in this case

    Yep, this will be released in the next PRO build (a minor one, 6.1.5).

    Asserts are used only in the non-minified version of Webix to help developers understand their errors in time, they are not supposed for being modified. And asserts do not exist in a production build (I mean webix.min.js).

    If you do really wish to supress messages (not console logging, though) you can modify webix.message and check whether a message with a "debug" type is going to be shown.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion