bem-components icon indicating copy to clipboard operation
bem-components copied to clipboard

Неожиданное поведение метода setVal при доопределении input

Open ijakparov opened this issue 5 years ago • 0 comments

Если в блоке input из bem-components переопределить метод setVal, то новый метод выполняется сам по себе без остановки при инициализации блока.

modules.define('input', [ 'i-bem-dom' ], function (provide, bemDom, Input) {
    provide(bemDom.declBlock(Input, {
        setVal: function (val, data) {
            console.log(999);
            return this;
        }
    }));
});

ijakparov avatar Feb 29 '20 17:02 ijakparov