Skip to content

Conversation

@jzaefferer
Copy link

Building on top of jquerygh-1599, this fixes missing or redundant handling of the disabled option on create. The only missing widget is tabs. From my comment on the original PR:

Tabs is not working correctly, for example it ends up with the ui-tabs-disabled class when only setting specific tabs, like disabled: [1, 2]. Due to the array variant I haven't yet figured out what to do here.

@jzaefferer
Copy link
Author

This wasn't really supposed to be a PR on your fork :/

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already happens in the call to ._super() above.

@scottgonzalez
Copy link
Owner

For tabs, you should be able to just rename ._setupDisabled(). You can drop the conditional in ._setOptions() as well.

@jzaefferer
Copy link
Author

Updated. Removed all the redundant calls in setOption. Updated tooltip to use _setOptionDisabled.

Updated tabs, renaming to _setupDisabled to _setOptionDisabled. It still calls _setOptionDisabled in _refresh, which is also called on create. I added an explicit _toggleClass call to only add "ui-tabs-disabled" when all tabs are disabled.

@scottgonzalez scottgonzalez merged commit 80f85e0 into scottgonzalez:disabled-setter Sep 22, 2015
@jzaefferer jzaefferer deleted the disabled-setter2 branch September 30, 2015 16:26
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.

2 participants