min. row count fixed
This commit is contained in:
parent
950527804a
commit
e6361a3c91
2
js/admin.min.js
vendored
2
js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
@ -29,9 +29,9 @@ export default class UserOverview extends React.Component {
|
|||||||
pageCount: 1,
|
pageCount: 1,
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
},
|
},
|
||||||
errors: []
|
errors: [],
|
||||||
|
rowCount: 0
|
||||||
};
|
};
|
||||||
this.rowCount = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchGroups(page) {
|
fetchGroups(page) {
|
||||||
@ -46,9 +46,9 @@ export default class UserOverview extends React.Component {
|
|||||||
pageCount: res.pageCount,
|
pageCount: res.pageCount,
|
||||||
page: page,
|
page: page,
|
||||||
totalCount: res.totalCount,
|
totalCount: res.totalCount,
|
||||||
}
|
},
|
||||||
|
rowCount: Math.max(this.state.rowCount, Object.keys(res.groups).length)
|
||||||
});
|
});
|
||||||
this.rowCount = Math.max(this.rowCount, Object.keys(res.groups).length);
|
|
||||||
} else {
|
} else {
|
||||||
let errors = this.state.errors.slice();
|
let errors = this.state.errors.slice();
|
||||||
errors.push({title: "Error fetching groups", message: res.msg});
|
errors.push({title: "Error fetching groups", message: res.msg});
|
||||||
@ -76,9 +76,9 @@ export default class UserOverview extends React.Component {
|
|||||||
pageCount: res.pageCount,
|
pageCount: res.pageCount,
|
||||||
page: page,
|
page: page,
|
||||||
totalCount: res.totalCount,
|
totalCount: res.totalCount,
|
||||||
}
|
},
|
||||||
|
rowCount: Math.max(this.state.rowCount, Object.keys(res.users).length)
|
||||||
});
|
});
|
||||||
this.rowCount = Math.max(this.rowCount, Object.keys(res.users).length);
|
|
||||||
} else {
|
} else {
|
||||||
let errors = this.state.errors.slice();
|
let errors = this.state.errors.slice();
|
||||||
errors.push({title: "Error fetching users", message: res.msg});
|
errors.push({title: "Error fetching users", message: res.msg});
|
||||||
@ -196,7 +196,7 @@ export default class UserOverview extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(userRows.length < this.rowCount) {
|
while(userRows.length < this.state.rowCount) {
|
||||||
userRows.push(
|
userRows.push(
|
||||||
<tr key={"empty-row-" + userRows.length}>
|
<tr key={"empty-row-" + userRows.length}>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
@ -298,7 +298,7 @@ export default class UserOverview extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(groupRows.length < this.rowCount) {
|
while(groupRows.length < this.state.rowCount) {
|
||||||
groupRows.push(
|
groupRows.push(
|
||||||
<tr key={"empty-row-" + groupRows.length}>
|
<tr key={"empty-row-" + groupRows.length}>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
|
Loading…
Reference in New Issue
Block a user