add a row from an external form
- Ngôn ngữ chính
- TypeScript
- Star
- 1.6k
- Fork
- 867
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I have a form in my html , after submitting the form i want to create another entry(row) in my ng2-smart-table
this is my settings
~~~~
settings = {
mode : 'external',
columns: {
Transformation: {
title: 'Transformation', filter: false
},
TableSource: {
title: 'Table_Source', filter: false
},
Colonne: {
title: 'Colonne', filter: false
},
Expression: {
title: 'Expression', filter: false
},
Condition: {
title: 'Condition', filter: false
},
Agg_Function: {
title: 'Agg_Function', filter: false
},
Format: {
title: 'Format', filter: false
},
Table_Hbase: {
title: 'Table_Hbase', filter: false
},
CF: {
title: 'CF', filter: false
},
CN: {
title: 'CN', filter: false
},
}
};
~~~~
and this is my initial source data, this objectc was successfully displayed in the table
~~~~
data= [
{
Transformation: 'test' ,
TableSource: 'test',
Colonne: 'test',
Expression: 'test',
Condition: 'test',
Agg_Function: 'test',
Format: 'test',
Table_Hbase: 'test',
CF: 'test',
CN: 'test'
}
];
~~~~
but when i submit the form, and i push the new informations in data array (the source )
nothing is happened to the ng2-smart-table.
this.source.data contain the new data after the push but nothing displayed aove the initail init.
this how i push the data
~~~~
this.trans={
Transformation: this.transformationSelected ,
TableSource: this.tableSqlSelected,
Colonne: this.colonneSqlSelected,
Expression: this.expression,
Condition: this.condition,
Agg_Function: '-',
Format: '-',
Table_Hbase: this.tableHbasesSelected,
CF: this.colFamilySelected,
CN: this.colname
}
//this was the first alternative
//this.data.push(this.trans)
//this is the second alternative
//this.source.add(this.trans)
~~~~
i don't know what to do, if i want to use a completely external form to add a new data to the smart table
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.