All Versions
21
Latest Version
Avg Release Cycle
60 days
Latest Release
1530 days ago
Changelog History
Page 1
Changelog History
Page 1
-
v6.0.0 Changes
January 06, 2021โ Added
- โ Add custom handle icons (@morinted)
- โ Add
aria-checked
attribute (@monicahung) - โ Add borderRadius prop
๐ Fixed
- Prevent setState from being called after component is unmounted (@smhg)
๐ Changed
- ๐ When the
checked
state is not changed in theonChange
callback, the switch will now go back to its previous position instead of getting stuck halfway. This means the switch will move back and forth if theonChange
callback changes the state after an asynchronous operation. - ๐ Support react and react-dom 17 as peer dependencies
- โก๏ธ Update all dev depencies
-
v5.0.1 Changes
July 16, 2019๐ Fixed
- Minor typescript definition fix.
-
v5.0.0 Changes
April 22, 2019โ Added
- It's now possible to give the Switch any prop (such as aria-* props or tabIndex) and it will automatically be passed to the nested
input
-element. - ๐ Improved Typescript compatibility by using
exports:named
option in rollup. This could possibly be breaking for some obscure setups.
๐ Changed
- โก๏ธ Replaced deprecated
componentWillReceiveProps
lifecycle hook withcomponentDidUpdate
, which means it now works in strict mode.
๐ Fixed
- Now works properly with right-to-left languages.
- It's now possible to give the Switch any prop (such as aria-* props or tabIndex) and it will automatically be passed to the nested
-
v4.1.0 Changes
February 17, 2019โ Added
- โ Add support for name attribute
-
v4.0.0 Changes
January 30, 2019๐ Changed
- The switch now includes a hidden nested checkbox input, which creates an expience more akin to a normal checkbox - clicking on the label will now cause a toggle, and the VoiceOver screen reader will now reliably read the label.
- The switch will now always fire the onChange event if the dragStop event occurs <250ms after the dragStart event since that feels like a click.
- Aria role changed from "checkbox" to "switch".
- Pressing enter no longer activates the switch (spacebar still does)
โ Added
- โ Add new tabIndex prop
๐ Fixed
- ๐ Fix glitch where the clicking the handle wouldn't trigger onChange event when browser window was out of focus on Windows.
-
v3.0.3 Changes
June 15, 2018๐ Fixed
- Fix glitch where the switch would disintegrate if it had a parent with text-align set to center or right
-
v3.0.2 Changes
June 07, 2018๐ Changed
- โ Add the correct gzip badge.
-
v3.0.1 Changes
June 07, 2018๐ Changed
- Some more byte shaving.
-
v3.0.0 Changes
June 07, 2018๐ Changed
- Shave off some extra bytes by setting interop: false in rollup config.
๐ Fixed
- ๐ Fix peculiar glitch when used with preact-compat.
-
v3.0.0-beta.0 Changes
June 06, 2018๐ Changed
- Project structure was completely revamped to reduce bundle size:
- Use rollup to bundle the different source files.
- Use buble instead of babel for transpiling since it produces tinier output. ๐ 3. Remove prop-types from production mode. Prop-types are still there in development mode so developer experience is unchanged.
- Mangle property names with uglify by putting a \$-sign at the start of the properties that are safe to mangle.
๐ Fixed
- Corrected more dead links in README. Thanks, Valery Bugakov.