tabs icon indicating copy to clipboard operation
tabs copied to clipboard

method to "Enable" a tab

Open bignamehere opened this issue 8 years ago • 3 comments

I see in the examples that you can disable a Tab, but this seems useless without the ability to enable the disabled Tab. I tried setting the value of of disabled to a state property, and when it changed nothing happened.

<TabPane tab='Payment' key="2" disabled={this.state.paymentDisabled}>

Please point me in the right direction if I am missing the public method to enable the Tab.

bignamehere avatar Feb 27 '18 04:02 bignamehere

Set this.state.paymentDisabled to false, if it's still not working, try to reproduce it on https://codesandbox.io/

yesmeck avatar Feb 27 '18 04:02 yesmeck

My question was about setting the disabled property after the application has loaded. I want to be able to enable a disabled Tab. Initially, this.state.paymentDisabled is set to true so that the tab is disabled.

I did set this.state.paymentDisabled to false by clicking a button, but disabled is a prop that doesn't do anything. The CSS classes would need to be switched, and there is no method to do this, from what I can tell.

I am asking if this feature is available, and I don't see any documentation or anywhere in the code that enables a disabled Tab. Why would you ever want to have a disabled tab, if there is no way to enable it. That is just poor UX, and the Tab should never be available in the first place unless you can enable it.

bignamehere avatar Feb 27 '18 04:02 bignamehere

My mistake... I didn't see a JS error elsewhere that was failing silently. It works fine.

Cheers and thanks.

bignamehere avatar Feb 27 '18 04:02 bignamehere