useModalForm show() doesn't do anything after modal is opened and closed once
title
16 Replies
Hi @ganuzaz. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'm sorry, but your question seems incomplete. Could you please provide more details or context? I'm here to provide information about refine, a React-based framework for building data-intensive applications.
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------<@149140198213550080> kapa.ai is still learning and improving, please let us know how it did by reacting below
rising-crimson•13mo ago
@kapa.ai show() from useModalForm won't open the modal after the modal is being opened and closed once
Let me check the knowledge base for you. One moment! :books:
----------------------
Based on the information provided in the extracts, the
show()
function from useModalForm
is used to open the modal. However, there's no specific information about any issues with reopening the modal after it has been opened and closed once.
Here's a basic usage example of show()
from useModalForm
:
(Source: Refine Documentation (https://refine.dev/docs/api-reference/antd/hooks/form/useModalForm))
If you're experiencing issues with reopening the modal, it might be due to a specific implementation detail or a bug. I would recommend checking your implementation against the documentation and examples provided by Refine. If the issue persists, consider reaching out to the Refine community or support for more specific guidance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------<@149140198213550080> kapa.ai is still learning and improving, please let us know how it did by reacting below
rising-crimson•13mo ago
doing show(id) works for some reason, but if there is no id it will only show the modal once.. weird
harsh-harlequin•13mo ago
Hey @ganuzaz I don't understand what the problem is. Can you please attach a codesanbox with this problem?
rising-crimson•13mo ago
w8, wrong link
rising-crimson•13mo ago
go to a post show page
click edit modal
close the modal
and click again the edit modal button
it won't open the second time
unless i used
harsh-harlequin•13mo ago
You need to pass
id
in edit mode. Like this: onClick={() => { show(record?.id)}}
rising-crimson•13mo ago
Yes, but it works when i open the modal the first time and it seems like its not the intended behavior
harsh-harlequin•13mo ago
I did not see a problem when
id
was passed.rising-crimson•13mo ago
yea i know
im just telling you that it seems weird that when id is not passed its still works but only for the first time the modal is opened