Skip to content

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

Merged
merged 8 commits into from
Jun 24, 2020

Conversation

arthurxavierx
Copy link
Contributor

@arthurxavierx arthurxavierx commented Jun 22, 2020

This PR contains breaking changes.

  • Use link-style button in editable tables
  • Add context menu to Form.Table via a new rowMenu prop
  • Allow for using async actions to add new rows in Form.Table
  • Make form result available for the summary in Form.Table

Screen Shot 2020-06-22 at 11 54 25

@arthurxavierx arthurxavierx self-assigned this Jun 22, 2020
@maddie927 maddie927 changed the base branch from master to main June 22, 2020 19:31
Copy link
Member

@maddie927 maddie927 left a 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)

@arthurxavierx arthurxavierx force-pushed the arthur/editable-table branch 2 times, most recently from b156eba to ba368a9 Compare June 22, 2020 20:41
@arthurxavierx arthurxavierx force-pushed the arthur/editable-table branch from 7212cc8 to 0e5fe1a Compare June 23, 2020 13:42
@arthurxavierx arthurxavierx changed the title Use link-style button in editable table and add context menu to Form.Table Use link-style button in editable table and Form.Table improvements Jun 23, 2020
Copy link
Contributor

@hdgarrood hdgarrood left a 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))
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@arthurxavierx arthurxavierx merged commit d45f47f into main Jun 24, 2020
@arthurxavierx arthurxavierx deleted the arthur/editable-table branch June 24, 2020 15:14
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 this pull request may close these issues.

3 participants