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:
parent
31f90000e4
commit
f5dffd5512
@ -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)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user