Bug searchList translation Datatables ColumnControl (columnControl.list.empty is not correct)

Bug searchList translation Datatables ColumnControl (columnControl.list.empty is not correct)

ivanrovira137ivanrovira137 Posts: 1Questions: 1Answers: 0

Hello.

I found a bug in searchList.

The Spanish translation of Datatables ColumnControl has an error in columnControl.list.empty, since the empty attribute is not used in ColumnControl's .js, but rather emptyOption is used.

Here is the relevant fragment of the unminimized .js file of ColumnControl:

                var _loop_1 = function (i) {
                    var option = options[i];
                    var btn = new Button(this_1._s.dt)
                        .active(option.active || false)
                        .handler(function (e) {
                            _this._s.handler(e, btn, _this._s.buttons, true);
                            _this._updateCount();
                        })
                        .icon(option.icon || '')
                        .text(option.label !== ''
                            ? option.label
                            : this_1._s.dt.i18n('columnControl.list.emptyOption', 'Empty'))
                        .value(option.value);
                    if (option.label === '') {
                        btn.className('empty');
                    }
                    this_1._s.buttons.push(btn);
                };

I don't know if other languages have this problem.

Since the official Datatables website indicates that columnControl.list.empty is the correct tag, then either the .js and the information on the page must be changed, or the translations must be changed.

Answers

  • allanallan Posts: 65,058Questions: 1Answers: 10,773 Site admin

    Hi,

    Thanks for letting me know about this. Yes, all the language files have that same problem. I've corrected the code to match the documentation and translation files. Hoping to make a release of ColumnControl with this and other changes soon.

    Regards,
    Allan

Sign In or Register to comment.