Fix extra FormTab/Tab props are passed to two different components - #2654
Conversation
|
Wait, it's not the right fix. The problem is that FormTab passes extra props both to the tab header and to the tab inputs. That can never work, because there is no prop that can work on such different components. The right fix is to remove the |
So I think what you're saying is to undo all of the other changes and simply remove I don't think this will work because
|
|
Oh wait, you're saying to remove it - so none of those props will be passed. I got it, thanks! |
|
OK, I removed the forwarding of props in the In |
|
You were too aggressive when removing the props you passed to FormInput. See SimpleForm to understand which props need to be passed explicitly. |
|
OK, sorry about that - I am still waiting over an hour to get this I looked at the code for |
|
you'll have the same problem with Tab, see SimpleShowLayout for an example of what props to pass to children ( |
|
OK, I just don't see those props anywhere in devtools on a |
|
I already knew what to do before I looked at |
|
I'm guessing that the 1 test is failing because of another prop that is not being passed? I'm not sure where the error is coming from. The stack trace is useless. The My original solution passed all tests since it only added the feature and changed nothing else. Now we're working on something else. I could start passing some of the other props that I see in devtools, but it takes too long to run these tests and I already spent over 3 hours on this. This feature turned into something a lot less trivial and I don't think I can spend anymore time on it. Without this feature, things work in production without any errors. I just wanted to fix an error in my console. Sorry. |
|
Thanks for your time. I'll take it from then on and try to finish it. |
|
Thanks, you were very close to the target! |
|
Thank you so much for taking the time to wrap this up! I might have known to do that since I had previously removed props from being passed to that |
For issue #2651.
I looked at every component that used
Linkand decided thatTabandFormTabwere the only components where this ability really made sense.I briefly considered adding docs for this prop, but
TabandFormTabare not documented and neither are their properties, so I thought it best to leave that for a different pull request.Thank you.