Minor extension in the table widget client-side API.

This commit is contained in:
alekseybobkov 2015-11-20 21:02:45 -08:00
parent 30eedebed9
commit c72920029e
2 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -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,