我從firebase獲取數據並使用ng2-smart-table顯示數據。 我添加數據後創建按鈕不關閉的問題。它仍然以添加的值打開。 我的代碼是:ng2-smart-table創建按鈕無法正常工作
settings = {
pager:{perPage:50},
add: {
addButtonContent: '<i class="ion-ios-plus-outline"></i>',
createButtonContent: '<i class="ion-checkmark"></i>',
cancelButtonContent: '<i class="ion-close"></i>',
confirmCreate: true,
},
和增加的功能:
onCreateConfirm(event): any {
//this service is updating the new data to firebase.
this.service.createData(event.newData);
//after that the newdata still on edit mode and not closing it...
}
但這將自動添加到表,也是我的函數添加這火力地堡db,然後它會自動更新2個實例的表,從firebase和其他的解決。 –
我不明白你的問題,你能給我更多的解釋 –
問題是,我將這個新的數據添加到Firebase列表。這個列表綁定到表中的數據源,然後在表中更新它,然後如果我會按照你的方式更新表的功能,我將有2個實例,一個是解析和其他的虛擬結果一個由firebase名單。 –