zollero / el-search-table-pagination

🐶 Combine Form, Table and Pagination components of Element UI together.
MIT License
306 stars 79 forks source link

`current-change` event is duplicated on <el-table> and <el-pagination> #11

Closed choegyumin closed 6 years ago

choegyumin commented 6 years ago

current-change event namespace is duplicated on <el-table> and <el-pagination>. so, we have to compare whether the type of the first argument of event is an object or a number.

Can you fix the event name or have another solutions?

http://element.eleme.io/#/en-US/component/table#table-events http://element.eleme.io/#/en-US/component/pagination#events

Event Name Element Description Parameters
current-change <el-table> triggers when current row changes currentRow, oldCurrentRow
current-change <el-pagination> triggers when current-page changes the new current-page
zollero commented 6 years ago

Hi, thx for the good question.

Currently, el-search-table-pagination has catch the current-change event of <el-pagination> and do some handling (change page no and fire a ajax request) in el-search-table-pagination.

So, you only can get the current-change event of <el-table> on el-search-table-pagination component, and cannot get the current-change event of <el-pagination>.

choegyumin commented 6 years ago

I was mistaken. when the page was changed, row is unselected. so and the event occurred. Thanks.