Minor extension in the table widget client-side API.
This commit is contained in:
parent
30eedebed9
commit
c72920029e
|
|
@ -221,6 +221,7 @@ this.navigation.pageIndex=newPageIndex}
|
|||
this.recordsAddedOrDeleted++
|
||||
var keyColumn=this.options.keyColumn,recordData={},self=this
|
||||
recordData[keyColumn]=-1*this.recordsAddedOrDeleted
|
||||
this.$el.trigger('oc.tableNewRow',[recordData])
|
||||
this.dataSource.createRecord(recordData,placement,relativeToKey,this.navigation.getPageFirstRowOffset(),this.options.recordsPerPage,function onAddRecordDataTableSuccess(records,totalCount){self.buildDataTable(records,totalCount)
|
||||
var row=self.findRowByKey(recordData[keyColumn])
|
||||
if(!row)
|
||||
|
|
|
|||
|
|
@ -577,6 +577,10 @@
|
|||
|
||||
recordData[keyColumn] = -1*this.recordsAddedOrDeleted
|
||||
|
||||
this.$el.trigger('oc.tableNewRow', [
|
||||
recordData
|
||||
])
|
||||
|
||||
this.dataSource.createRecord(recordData, placement, relativeToKey,
|
||||
this.navigation.getPageFirstRowOffset(),
|
||||
this.options.recordsPerPage,
|
||||
|
|
|
|||
Loading…
Reference in New Issue