Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4298 Представления

I am using odoov11. I have overridden _renderBodyCell method of list view to update table cell value. I am unable to use timeout function because of this method return td element. I want to change td element each second. How can I perform this? 
Here is my code:

var ListRenderer = require('web.ListRenderer')


ListRenderer.include({

_renderBodyCell: function (record, node, colIndex, options) {

if (my_condition){

    //my code here.....
    var result = this.render_countdown(formated_date, formattedValue, tdClassName); //my_custom_method
    return $td.html(result); //becuse of this return I will not use settimeout method

}else{
    return this._super.apply(this, arguments);
}

},

_renderRow: function (record) {

this._super.apply(this, arguments);
                var self = this;
                this.update_timer = setTimeout(function() {
                 self._renderRow(); 
                 }, 1000);
},

})

I have also tried to call _renderRow method for changing value of td, but not worked.
Any help?

Аватар
Отменить
Лучший ответ

hello Maitree Trivedi, how you solved your problem i have the same problem

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
авг. 25
570
1
нояб. 22
2935
2
июл. 22
9054
1
июн. 21
2325
2
февр. 21
299