avoid the flicker when switching between detailed view and normal view by just clearing out the data before making a new request. The vast majority of the delay is not in the api call, but in rendering the data - and at just a split second, it isn't long enough for a spinner to be very effective.
This commit is contained in:
parent
c565491936
commit
f5f0c86bf4
|
@ -29,6 +29,11 @@ export default function ProcessInstanceLogList({ variant }: OwnProps) {
|
|||
}
|
||||
|
||||
useEffect(() => {
|
||||
// Clear out any previous results to avoid a "flicker" effect where columns
|
||||
// are updated above the incorrect data.
|
||||
setProcessInstanceLogs([]);
|
||||
setPagination(null);
|
||||
|
||||
const setProcessInstanceLogListFromResult = (result: any) => {
|
||||
setProcessInstanceLogs(result.results);
|
||||
setPagination(result.pagination);
|
||||
|
|
Loading…
Reference in New Issue