Giter Club home page Giter Club logo

Comments (9)

makishvili avatar makishvili commented on August 17, 2024

Всё поправлю.
То, что блюр удаляет инпут - не видел, воспроизведу, исправлю.

А насчёт последнего хочу спросить ехидным голосом: "А зачем вы делаете последовательно disable, а потом enable? Не делайте" ;)

from docs.

dracowf avatar dracowf commented on August 17, 2024

Хорошо) Ради науки!
А так, надеялся, что enable воскресит disable, что, кстати, и происходит, когда это пробовать делать не через экземпляр класса (_greetingInput), а в самом классе.

// Обрабатываем клик по крестику
                this._bindTo(this._clear, 'click', this._onClearClicked);

                this._bindTo(this._clear, 'click', this.disable);
                this._bindTo(this._clear, 'click', this.enable);

from docs.

makishvili avatar makishvili commented on August 17, 2024

Я закрою, когда исправлю остальные недочёты. Но уже не сегодня :)

from docs.

makishvili avatar makishvili commented on August 17, 2024

Александр, не могу воспроизвести кейс, когда вызова блюра на инпуте удаляет инпут.

Покажите, пожалуйста, код модуля form.js

from docs.

dracowf avatar dracowf commented on August 17, 2024

Может так вообще не стоит делать? :)
В конструкторе задавать снятие состояния...

modules.define(
    'form',
    ['inherit', 'block', 'input'],
    function (provide, inherit, YBlock, Input) {
        var form = inherit(YBlock, {
            __constructor: function () {
                this.__base.apply(this, arguments);
                console.log("!");
                // Создаём инпут
                this._greetingInput = new Input();
                this._greetingInput.setValue('Привет, Бивис!');

                //this._greetingInput.focus();
                this._greetingInput.blur();
                //this._greetingInput.disable();
                //this._greetingInput.enable();

                // Рендерим форму
                this._render();
            },

            /**
             * Рендерит все контролы в форме
             */
            _render: function () {
                var form = this.getDomNode();
                var greeting = this._greetingInput.getDomNode();

                greeting.appendTo(form);
            }
        }, {
            getBlockName: function () {
                return 'form';
            }
        });

        provide(form);
    });

from docs.

dracowf avatar dracowf commented on August 17, 2024

. P.S. Смотрю на труд ваш - Спасибо!:)

from docs.

makishvili avatar makishvili commented on August 17, 2024

Как мне кажется, не бывает такой реальной задачи, чтобы в конструкторе Инпута приходилось сразу блюрить инпут.

from docs.

makishvili avatar makishvili commented on August 17, 2024

Саша, закроем или есть вопросы, на которые я не ответил?

from docs.

dracowf avatar dracowf commented on August 17, 2024

Всё отлично, можно закрывать =)

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.