@instructure/ui-tabs
Advanced tools
Comparing version 5.5.0-dev.0 to 5.5.0
@@ -129,3 +129,3 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
if (props.selectedIndex === undefined) { | ||
if (typeof props.selectedIndex === 'undefined') { | ||
_this.state.selectedIndex = props.defaultSelectedIndex; | ||
@@ -165,3 +165,3 @@ } | ||
var handleChange = function handleChange() { | ||
if (selectedIndex !== undefined && typeof _this2.props.onChange === 'function') { | ||
if (typeof selectedIndex !== 'undefined' && typeof _this2.props.onChange === 'function') { | ||
_this2.props.onChange(index, selectedIndex); | ||
@@ -171,3 +171,3 @@ } | ||
if (this.props.selectedIndex === undefined) { | ||
if (typeof this.props.selectedIndex === 'undefined') { | ||
this.setState(function (state, props) { | ||
@@ -356,3 +356,3 @@ selectedIndex = state.selectedIndex; | ||
get: function get() { | ||
return this.props.selectedIndex === undefined ? this.state.selectedIndex : this.props.selectedIndex; | ||
return typeof this.props.selectedIndex === 'undefined' ? this.state.selectedIndex : this.props.selectedIndex; | ||
} | ||
@@ -359,0 +359,0 @@ }, { |
@@ -190,3 +190,3 @@ 'use strict'; | ||
if (props.selectedIndex === undefined) { | ||
if (typeof props.selectedIndex === 'undefined') { | ||
_this.state.selectedIndex = props.defaultSelectedIndex; | ||
@@ -226,3 +226,3 @@ } | ||
var handleChange = function handleChange() { | ||
if (selectedIndex !== undefined && typeof _this2.props.onChange === 'function') { | ||
if (typeof selectedIndex !== 'undefined' && typeof _this2.props.onChange === 'function') { | ||
_this2.props.onChange(index, selectedIndex); | ||
@@ -232,3 +232,3 @@ } | ||
if (this.props.selectedIndex === undefined) { | ||
if (typeof this.props.selectedIndex === 'undefined') { | ||
this.setState(function (state, props) { | ||
@@ -417,3 +417,3 @@ selectedIndex = state.selectedIndex; | ||
get: function get() { | ||
return this.props.selectedIndex === undefined ? this.state.selectedIndex : this.props.selectedIndex; | ||
return typeof this.props.selectedIndex === 'undefined' ? this.state.selectedIndex : this.props.selectedIndex; | ||
} | ||
@@ -420,0 +420,0 @@ }, { |
{ | ||
"name": "@instructure/ui-tabs", | ||
"version": "5.5.0-dev.0", | ||
"version": "5.5.0", | ||
"description": "A UI component library made by Instructure Inc.", | ||
@@ -25,6 +25,6 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"dependencies": { | ||
"@instructure/ui-layout": "^5.5.0-dev.0", | ||
"@instructure/ui-motion": "^5.5.0-dev.0", | ||
"@instructure/ui-themeable": "^5.5.0-dev.0", | ||
"@instructure/ui-utils": "^5.5.0-dev.0", | ||
"@instructure/ui-layout": "^5.5.0", | ||
"@instructure/ui-motion": "^5.5.0", | ||
"@instructure/ui-themeable": "^5.5.0", | ||
"@instructure/ui-utils": "^5.5.0", | ||
"classnames": "^2.2.5", | ||
@@ -35,4 +35,4 @@ "keycode": "^2.1.8", | ||
"devDependencies": { | ||
"@instructure/ui-presets": "^5.5.0-dev.0", | ||
"@instructure/ui-themes": "^5.5.0-dev.0" | ||
"@instructure/ui-presets": "^5.5.0", | ||
"@instructure/ui-themes": "^5.5.0" | ||
}, | ||
@@ -39,0 +39,0 @@ "peerDependencies": { |
@@ -108,3 +108,3 @@ /* | ||
if (props.selectedIndex === undefined) { | ||
if (typeof props.selectedIndex === 'undefined') { | ||
this.state.selectedIndex = props.defaultSelectedIndex | ||
@@ -169,3 +169,3 @@ } | ||
get selectedIndex () { | ||
return (this.props.selectedIndex === undefined) ? this.state.selectedIndex : this.props.selectedIndex | ||
return (typeof this.props.selectedIndex === 'undefined') ? this.state.selectedIndex : this.props.selectedIndex | ||
} | ||
@@ -200,3 +200,3 @@ | ||
const handleChange = () => { | ||
if (selectedIndex !== undefined && typeof this.props.onChange === 'function') { | ||
if (typeof selectedIndex !== 'undefined' && typeof this.props.onChange === 'function') { | ||
this.props.onChange(index, selectedIndex) | ||
@@ -206,3 +206,3 @@ } | ||
if (this.props.selectedIndex === undefined) { | ||
if (typeof this.props.selectedIndex === 'undefined') { | ||
this.setState((state, props) => { | ||
@@ -209,0 +209,0 @@ selectedIndex = state.selectedIndex |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
115403
0