Refresh on publish page does not have loading indicator

## Fixes:
4214

## Approach:
`ClaimList` currently only shows the loading indicator if there is a header. We could make the indicator always appear at the top of the list when `loading=true`, but that would be the list jump up and down as the indicator appears/dissapears. I assume that is too distracting and is the reason why it was not made that way in the first place.

Show the indicator in place of the Refresh button while fetching instead.
This commit is contained in:
infiinte-persistence 2020-06-30 18:14:18 +08:00 committed by Sean Yesmunt
parent fe3ef8f8e5
commit 3288f235fb

View file

@ -63,12 +63,15 @@ function FileListPublished(props: Props) {
title={__('Publishes')} title={__('Publishes')}
titleActions={ titleActions={
<div className="card__actions--inline"> <div className="card__actions--inline">
<Button {fetching && <Spinner type="small" />}
button="alt" {!fetching && (
label={__('Refresh')} <Button
icon={ICONS.REFRESH} button="alt"
onClick={() => fetchClaimListMine(params.page, params.page_size)} label={__('Refresh')}
/> icon={ICONS.REFRESH}
onClick={() => fetchClaimListMine(params.page, params.page_size)}
/>
)}
<Button <Button
icon={ICONS.PUBLISH} icon={ICONS.PUBLISH}
button="secondary" button="secondary"