mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-17 19:36:28 +02:00
Post work PR #1743
This commit is contained in:
@@ -953,7 +953,10 @@ export function HMSErrorModal({ printerName, errors, onClose, printerId, hasPerm
|
||||
job_id: data.job_id,
|
||||
}),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['printerStatus'] });
|
||||
// Scope the invalidation to THIS printer. The prefix form
|
||||
// `['printerStatus']` would refresh every printer card on the page,
|
||||
// which is wasteful when only one printer's state actually changed.
|
||||
queryClient.invalidateQueries({ queryKey: ['printerStatus', printerId] });
|
||||
showToast(t('hmsErrors.actionSuccess', 'Action sent to printer'), 'success');
|
||||
onClose();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user