-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clone functionality is broken on create page with TabbedForm #4066
Comments
Thanks for reporting this. If you are able to illustrate the bug or feature request with an example, please provide a sample application via one of the following means:
|
@djhi https://codesandbox.io/s/simple-po3c1 Take a look at Posts clone functionality. |
Thanks, indeed there is a bug. |
Updated the sandbox to show bug is still there with version 3.1.3. @fzaninotto Looks like this issue may be a by product of this issue you created: supasate/connected-react-router#302 Is there anyway to fix this while that other PR is still open? Unfortunately, this bug is blocking us from upgrading to 3.x. |
What you were expecting:
When using
<CloneButton>
, I expected my tabbed form to have clones values across all tabs with 3.0 upgrade.What happened instead:
When I click on clone button, I do see cloned values on the first tab of create form. However, when I click on another tab it is empty. If I go back to orginal tab, it also has lost all pre-filled values.
Steps to reproduce:
Setup a resource with create page. Have create page use tabbed form with fields split between two tabs.
Have a list page with CloneButton.
On list page, click on clone button for 1 row.
React-admin will take you to create page with values in the URL query string.
See that on 1st tab values are pre-filled.
Click on second tab. Notice that URL no longer shows query string.
2nd tab will show blank fields.
Click on 1st tab. See that pre-filled values are now replaced with blank fields.
Other information:
I think this issue is related to 3.x change where CloneButton is using
search
instead ofstate
. With tabbed form, clicking on a tab results in URL changing and losingsearch
values which seems to cause this problem.Environment
Code Sandbox
https://codesandbox.io/s/simple-po3c1
The text was updated successfully, but these errors were encountered: