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

Create a new component <Conditional> for report #163

Open
sudhacheran opened this issue Aug 24, 2023 · 0 comments · May be fixed by #170
Open

Create a new component <Conditional> for report #163

sudhacheran opened this issue Aug 24, 2023 · 0 comments · May be fixed by #170
Assignees

Comments

@sudhacheran
Copy link
Collaborator

sudhacheran commented Aug 24, 2023

To make the template easier for a non-programmer to write, create a new component with a single property called condition that resolves to a boolean. If the condition is true, the Conditional's children are shown, otherwise it renders as null. It could be used here as:

< Conditional condition={props.data.comments_ductwork} >
Ductwork Comments: {props.data.comments_ductwork}
< /Conditional >
There might be few other places in the templates where this component could be used.

Note, this can't be used inline. In particular, you can't use it inside of a table.

@RaeChen07 RaeChen07 self-assigned this Sep 8, 2023
@RaeChen07 RaeChen07 linked a pull request Sep 8, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants