-
Notifications
You must be signed in to change notification settings - Fork 5
Add default renderer for form's Forest structure #153
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
Conversation
I'm not sure about exporting this from |
Yeah, I thought of doing that too but wasn't sure of how I felt about it; that's a good point you've brought up there. You only need to import from I'm ok with moving |
surround fieldDivider | ||
$ defaultRenderForest { forceTopLabels } | ||
$ Array.mapMaybe pruneTree | ||
$ forest | ||
} | ||
where | ||
fieldDivider = R.hr { className: "lumi field-divider" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is defined twice now, not a big deal though
Yeah, agreed. Since |
@@ -166,42 +167,52 @@ defaultRenderForm | |||
} | |||
-> Forest | |||
-> JSX | |||
defaultRenderForm { inlineTable, forceTopLabels } { readonly } forest = | |||
defaultRenderForm renderProps@{ inlineTable, forceTopLabels } { readonly } forest = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not using the renderProps
binding here, I think?
This can be used for writing form renderers for UI structures that embed
Forest
.