view: reset listview count on list API call (#271)

Fixes #258

Reset items count for listview while calling a list API to prevent wrong pagination on empty list in response.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Abhishek Kumar 2020-03-31 16:45:15 +05:30 committed by Rohit Yadav
parent ac2e4f266e
commit 6c4fdec2ac
1 changed files with 1 additions and 0 deletions

View File

@ -457,6 +457,7 @@ export default {
break
}
}
this.itemCount = 0
for (const key in json[responseName]) {
if (key === 'count') {
this.itemCount = json[responseName].count