getValue doesnot return the updated scope value

Tags: #<Tag:0x00007efc6561d858>

I am trying to implement custom editor for md-select copying the code from https://forum.handsontable.com/t/editor-2-way-binding-with-angular/116/6

But the get value function returns before the model is updated by md-select.

self.prototype.prepare = function(){

        Handsontable.editors.BaseEditor.prototype.prepare.apply(this, arguments);

        var _this= this;

        self.dropdown.scope().$apply(function(){

            self.dropdown.scope()['dropdownOptions'] = _this.cellProperties['source'];
        });
    };

 self.prototype.getValue = function(){

        return self.dropdown.scope()['dropdownValue'];
    };

Have you tried to add a slight delay (let’s say 10ms)? Some of the callbacks run slower so the data can show old results.