Update NewPrinter component to pass the result object to onOk callback upon successful submission, enhancing the handling of printer creation.

This commit is contained in:
Tom Butcher 2026-07-20 02:09:20 +01:00
parent 31f90000e4
commit f5dffd5512

View File

@ -96,8 +96,8 @@ const NewPrinter = ({ onOk, defaultValues }) => {
title='New Printer' title='New Printer'
onSubmit={async () => { onSubmit={async () => {
const result = await handleSubmit() const result = await handleSubmit()
if (result) { if (result?._id) {
onOk() onOk(result)
} }
}} }}
/> />