Skip to content
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

*FieldTemplate Contributions #1632

Closed
aodhan-domhnaill opened this issue Mar 4, 2020 · 4 comments
Closed

*FieldTemplate Contributions #1632

aodhan-domhnaill opened this issue Mar 4, 2020 · 4 comments

Comments

@aodhan-domhnaill
Copy link

I constructed an ObjectFieldTemplate that offers support for large templates with vertical Nav Pills to make it easier to move through the large form.

Do you have any catalog of additional *FieldTemplates that you support for users?
Would you accept a submission of such *FieldTemplates?
Should I put it in a /contrib folder of sorts?

@epicfaace
Copy link
Member

We haven't yet had submissions like these, but that would be great! Do you mind sharing your code? I'm wondering whether we should just add it as a template in a /contrib folder, or rather use it for core functionality such as the multiple pages proposal (#1157).

@aodhan-domhnaill
Copy link
Author

Cool there's some interest. I'll create a PR with a contrib folder first so you can see it.

@aodhan-domhnaill
Copy link
Author

aodhan-domhnaill commented Mar 11, 2020

So I was thinking of integrating it like in my Draft PR. https://github.com/rjsf-team/react-jsonschema-form/pull/1646/files

I'll need to refactor my code because I'm using react-bootstrap, but it was pretty simple like,

return (
            <div>
                <h2>{props.title}</h2>
                <Tab.Container id="left-tabs-example" defaultActiveKey={props.properties[0].name}>
                <Row>
                    <Col sm={3}>
                    <Nav variant="pills" className="flex-column">
                        {props.properties.map(
                            element =>
                            <Nav.Item>
                                <Nav.Link eventKey={element.name}>{props.schema.properties[element.name].title}</Nav.Link>
                            </Nav.Item>)}
                    </Nav>
                    </Col>
                    <Col sm={9}>
                    <Tab.Content>
                        {props.properties.map(
                            element =>
                            <Tab.Pane eventKey={element.name}>{element.content}</Tab.Pane>)}
                    </Tab.Content>
                    </Col>
                </Row>
                </Tab.Container>
            </div>
        )

@stale
Copy link

stale bot commented Apr 15, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please leave a comment if this is still an issue for you. Thank you.

@stale stale bot added the wontfix label Apr 15, 2022
@stale stale bot closed this as completed May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants