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

<Button> Specifying type/role? #242

Closed
orecus opened this issue Nov 25, 2016 · 5 comments
Closed

<Button> Specifying type/role? #242

orecus opened this issue Nov 25, 2016 · 5 comments

Comments

@orecus
Copy link

orecus commented Nov 25, 2016

I would like to suggest an improvement to the component. I have a use case where I would like to change the type/role from 'button' to 'submit' but in the current component it seems to be hardcoded when i looked at the source.

In my use-case i would like to use the component together with formsy-react, which seems to need the type=submit to trigger (atleast in my code), for now i've solved it by creating a simple button component where I can set the type when needed inside the forms but i would prefer to just use the supplied component.

Would it be possible to consider this for the next update?

Also, if I want to suggest a few new components for the future, would you prefer one issue per suggestion or could I assemble my suggestions to one issue?

@adidahiya
Copy link
Contributor

adidahiya commented Nov 25, 2016

Specifying type / role for buttons: that make sense; we'd accept a PR for that. It should just be a matter of reordering the props here so that user-provided props get spread after type="button" (but keep the other ones in their current intentional order).

Filing issues: this issue you filed here was well-scoped and appropriate 👍 . I don't have a general rule -- use your judgement about whether issues belong together as a single issue. If it's a bunch of small enhancements to the same component or a single root problem that propagates an issue to many components, prefer a single issue. Otherwise, more generally, FRs for separate components should be filed separately.

@giladgray
Copy link
Contributor

Hah I had fixed this in #229 by putting type/role before the spreads, but that one never merged. Easy to resolve!

@orecus
Copy link
Author

orecus commented Nov 29, 2016

Thanks @adidahiya! I think it would be a small but great improvement, even though it seems that formsy-react is stalled and I'm looking at other options instead but the same problem might show itself in other similar options. :)

Regarding Issues: Great to know, I have a few suggestions on new components and improvements. I'll gather my thoughts and once I have them all sorted out I'll start adding issues for them! 👍

@llorca llorca added this to the 1.3.0 milestone Nov 29, 2016
@paulpooch
Copy link
Contributor

Yeah I was having issues with redux-form not submitting because of this.

@paulpooch
Copy link
Contributor

Hey I found a temporary workaround to this.... just put a stupid hidden submit button next to your pretty Blueprint Button. I've actually wrapped this combo into it's own component.

<form>
  
  // inputs here
  
  <span>
    <Blueprint.Button>Submit</Blueprint.Button>
    <button type="submit" style={{ display: 'none' }} />
  </span>
</form>

@llorca llorca modified the milestones: 1.2.0, 1.3.0 Dec 2, 2016
@llorca llorca modified the milestones: 1.2.0, 1.3.0 Dec 2, 2016
giladgray added a commit that referenced this issue Dec 5, 2016
also support changing `tabIndex`.
closes #242.
adidahiya pushed a commit that referenced this issue Dec 6, 2016
Also support changing `tabIndex` on `AnchorButton`. Closes #242.
greglo pushed a commit to greglo/blueprint that referenced this issue Dec 12, 2016
Also support changing `tabIndex` on `AnchorButton`. Closes palantir#242.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants