material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[FlatButton] (and all buttons) lacks target property

Open toddmedema opened this issue 10 years ago • 5 comments

Problem description

You can specify an href for buttons, but you can't specify a target (ie target="_blank"), so you still need to write extra code if you want a button to open a separate tab (ie for a help button)

toddmedema avatar Oct 24 '16 23:10 toddmedema

From the Tabs/Tab official documentation, there is Controlled example showing how to switch between tabs programmatically, setting the Tabs.state.value referencing each Tab.

I doubt adding a target prop to Tab would change anything, and kinda anti-pattern.

Sharlaan avatar Oct 25 '16 20:10 Sharlaan

Hey @toddmedema, thanks for openning an issue!

I think the issue here is aiming tabs on a browser environment, @Sharlaan, not the component itself.

I think this is a valid feature request and also a good first issue, we would be glad to review a PR for it!

lucasbento avatar Oct 25 '16 22:10 lucasbento

I have just merged #5491 documenting where the no listed properties are going to be applied. E.g. the target property is going to be applied to the root element. I don't think that we should be adding target explicitly in the docs as the list of interesting properties we could add is very long. I would rather educate users regarding this general behavior on all the components.

oliviertassinari avatar Nov 01 '16 10:11 oliviertassinari

Should this be closed? I see jvhoven submitted a PR that does exactly what this issue describes.

danep93 avatar Jan 16 '17 21:01 danep93

Thanks for the reminder.

oliviertassinari avatar Jan 16 '17 21:01 oliviertassinari