fix(GroupingPrediction): show refresh button when uidScoreRequest data exists
Previously, the refresh button was hidden whenever the cached uidScore size was greater than 0, or when the cached data was empty. This logic prevented the button from appearing even after a data request successfully returned data in uidScoreRequest. The updated logic now checks both the cached uidScore and the request data. If either contains data, the button is shown, ensuring users can refresh scores regardless of the caching state.
This commit is contained in:
parent
0c82384fd5
commit
36e280cb9f
@ -115,7 +115,7 @@ export const GroupingPrediction: React.FC<Props> = props => {
|
|||||||
OrderScore.年度积分,
|
OrderScore.年度积分,
|
||||||
]} />
|
]} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item hidden={uidScore.size > 0}>
|
<Form.Item hidden={uidScore.size > 0 || (uidScoreRequest.data?.size || 0) > 0}>
|
||||||
<Button loading={uidScoreRequest.loading} onClick={handleSyncUidScore} icon={<SyncOutlined />}>
|
<Button loading={uidScoreRequest.loading} onClick={handleSyncUidScore} icon={<SyncOutlined />}>
|
||||||
刷新当前积分
|
刷新当前积分
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user