Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3566 Weergaven

I want to update the product list on the POS by clicking on a button. I am able to reload all data from the server by calling the load_server_data method but I am unable to update the UI.

Here is what I have tried

var spans = el_node.querySelectorAll('.refresh-products');
for(var i = 0; i < spans.length; i++){ spans[i].addEventListener('click',function(){ $.when(self.pos.load_server_data()) .done(function() { self.__parentedParent.product_list_widget = new screens.ProductListWidget(self,{ click_product_action: function(product){ self.__parentParented.click_product(product); }, product_list: self.pos.db.get_product_by_category(0) }); self.gui.show_screen('products'); }).fail(function() { }); }); }
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
aug. 23
2929
0
feb. 22
2680
0
okt. 18
3605
0
okt. 18
4487
0
aug. 18
2664