Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Toggle js init value #170

Closed
wants to merge 26 commits into from
Closed

Conversation

seriewe
Copy link

@seriewe seriewe commented Oct 28, 2016

Init toggle value as selected if is checked attribute set

@Jahnp
Copy link
Collaborator

Jahnp commented Oct 28, 2016

Thanks for the PR @seriewe. What's the purpose of these changes? What are you trying to solve?

@seriewe
Copy link
Author

seriewe commented Oct 28, 2016

Hi, if my toggle is checked on server side and the view is rendered, the checkbox was not selected by fabric ui. So I check the "checked" Attribute and set is-selected. Sorry for the confusing stuff with the border inside the pull request. The important stuff is inside the Toggle.ts ctor.

@@ -35,7 +40,6 @@ namespace fabric {
}

private _toggleHandler(): void {
this._toggleField.classList.toggle("is-selected");
Copy link
Contributor

Choose a reason for hiding this comment

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

_toggleHandler() now does nothing yet the method is still used as a callback to a few events. Was removing this method's body intentional?

Copy link
Author

Choose a reason for hiding this comment

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

Hi, no this was a mistake. The _toggleHandler() should still stay the same. Should I create a new PullRequest?

@OfficeDev OfficeDev deleted a comment from msftclas Sep 27, 2017
@Linda-Editor
Copy link
Contributor

Microsoft no longer supports this content and will not be responding to bugs or issues. We recommend that you use the newer version, Office UI Fabric, with React as your front-end framework. We are closing this issue; if you still need assistance with Fabric.js, visit Stack Overflow/office-ui-fabric.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants