diff --git a/dist/index.js b/dist/index.js index 1d06340..d1d73d0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var React=require("react"),React__default=_interopDefault(React),PropTypes=_interopDefault(require("prop-types")),isEqual=_interopDefault(require("lodash.isequal")),debounce=function(l,r){var n=null;return function(){clearTimeout(n);var e=arguments,t=this;n=setTimeout(function(){l.apply(t,e)},r)}},includes=function(e,t){return-1>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],n=0;n>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],n=0;n { selectValue, style, multiple, - tabIndex + tabIndex, } = props; const cssClass = isSelected ? 'option selected' : 'option'; const body = isDataObject(item, labelKey, valueKey) ? item[labelKey] : item; @@ -54,11 +54,11 @@ Option.propTypes = { item: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, - PropTypes.object + PropTypes.object, ]).isRequired, style: PropTypes.object, selectValue: PropTypes.func.isRequired, multiple: PropTypes.bool, - tabIndex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) + tabIndex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), }; export default Option; diff --git a/src/Placeholder.js b/src/Placeholder.js index a87d7b8..5c6fb93 100644 --- a/src/Placeholder.js +++ b/src/Placeholder.js @@ -23,7 +23,7 @@ class Placeholder extends React.PureComponent { labelKey, manySelectedPlaceholder, allSelectedPlaceholder, - allSelected + allSelected, } = this.props; let message = ''; @@ -79,7 +79,7 @@ Placeholder.defaultProps = { placeholder: 'None selected', allSelectedPlaceholder: '%s selected', manySelectedPlaceholder: '%s selected', - allSelected: false + allSelected: false, }; Placeholder.propTypes = { placeholder: PropTypes.string, @@ -87,7 +87,7 @@ Placeholder.propTypes = { PropTypes.array, PropTypes.string, PropTypes.number, - PropTypes.object + PropTypes.object, ]), numberDisplayed: PropTypes.number, multiple: PropTypes.bool, @@ -95,7 +95,7 @@ Placeholder.propTypes = { labelKey: PropTypes.string, manySelectedPlaceholder: PropTypes.string, allSelectedPlaceholder: PropTypes.string, - allSelected: PropTypes.bool + allSelected: PropTypes.bool, }; export default Placeholder; diff --git a/src/index.js b/src/index.js index c34f259..bfe3928 100644 --- a/src/index.js +++ b/src/index.js @@ -41,7 +41,7 @@ if (!Array.prototype.findIndex) { // 7. Return -1. return -1; - } + }, }); } diff --git a/tests/helpers/setup.js b/tests/helpers/setup.js index c914e1c..b2b0c6b 100644 --- a/tests/helpers/setup.js +++ b/tests/helpers/setup.js @@ -1,5 +1,5 @@ //Polyfill -window.requestAnimationFrame = function (callback) { +window.requestAnimationFrame = function(callback) { setTimeout(callback, 0); return 0; }; diff --git a/tests/utils.test.js b/tests/utils.test.js index af7ceeb..a4b0b97 100644 --- a/tests/utils.test.js +++ b/tests/utils.test.js @@ -2,7 +2,7 @@ import { isDataObject, hasItem, keyExtractor, - hasItemIndex + hasItemIndex, } from '../src/lib/utils'; describe('Utils', () => { describe('isDataObject', () => { @@ -23,7 +23,7 @@ describe('Utils', () => { all = Array.from(Array(10).keys()).map(v => { return { id: v + 1, - name: `Label ${v + 1}` + name: `Label ${v + 1}`, }; }); });