-
Notifications
You must be signed in to change notification settings - Fork 5
Use link-style button in editable table and Form.Table improvements #164
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
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.
👍 (btw I updated the pr to point to main
)
b156eba
to
ba368a9
Compare
7212cc8
to
0e5fe1a
Compare
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.
Nice 👍
-- | A `TableFormBuilder` makes a `FormBuilder` for an array where each row has | ||
-- | columns defined by it. | ||
editableTable | ||
:: forall props row result | ||
. { addLabel :: String | ||
, defaultValue :: Maybe row | ||
, addRow :: Maybe (Aff (Maybe row)) |
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.
I think this could do with a comment to say what the meaning of each Maybe is. I guess the outer maybe tells the component whether to render the "Add row" link at all, and the inner one allows you to decide whether or not to actually add the row when the link is clicked?
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.
Good point, I'll add a docstring here. Yes, that's exactly what those types mean.
This PR contains breaking changes.
Form.Table
via a newrowMenu
propForm.Table
summary
inForm.Table