-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fieldset preventing flexbox styling #762
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
Comments
@ttbarnes Until that optional prop is available a workaround is to use the Also see: #443 Update: Sorrry, I missed that #653 in 0.51.0 adds support for |
I found a workaround through random cutting and pasting and going through the source. This is the default object field template (from https://github.com/mozilla-services/react-jsonschema-form/blob/174e136af4fe728eb79e92594733ea729f3d659f/src/components/fields/ObjectField.js)
So if you want to keep your form the same as the default one, except for the
With the important bit being the ObjectFieldTemplate that you've included in your component and referenced in the form. One of the confusing parts of the docs is that they did include versions of this Lastly, you'll have to make |
This |
Change-type: patch See: rjsf-team/react-jsonschema-form#762 See: https://www.flowdock.com/app/rulemotion/resin-frontend/threads/wfiGK4TQmvgPYlgs41efXK-uREV Signed-off-by: Thodoris Greasidis <[email protected]>
FYI It would also be useful to know what exactly cannot be achieved why |
@ivarprudnikov basically |
@ivarprudnikov |
@JoshVazq could you come up with a real world example so that it is easy to see and test it? It would be useful to people looking into this issue. |
A typical use case for this would be a part of the form which should contain 2 inline styles as shown on this image(found via Google search). Creating custom widgets could be an overkill for larger forms, this can be solved by replacing However, it would be very beneficial to at least have a prop which would use |
Chrome is fixing this bug. https://bugs.chromium.org/p/chromium/issues/detail?id=375693#c80 |
27-04-2020 still anoying. What is the purpose of the fieldset. please remove it.pleeeaseee |
Chromium has now fixed this. https://bugs.chromium.org/p/chromium/issues/detail?id=375693#c87 |
This is no longer an issue in later versions of Chrome and was always fine in other browsers. Fieldset can take flex styles perfectly fine now. |
That's great -- so let's just close this issue in that case! |
Prerequisites
Description
Currently, the form is wrapped with a
fieldset
element:This is great, and semantic, however this can prevent some styling with flex. Flex cannot be applied to a fieldset, and so you cannot use flex to render the form layout as desired.
It would be great to have an optional prop that would change this fieldset to a div or something similar.
Just an initial idea - probably a better way to handle this. Any thoughts? I could do a PR.
The text was updated successfully, but these errors were encountered: