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:
kyuuseiryuu 2026-03-23 14:44:59 +09:00
parent 0c82384fd5
commit 36e280cb9f

View File

@ -115,7 +115,7 @@ export const GroupingPrediction: React.FC<Props> = props => {
OrderScore.,
]} />
</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>