diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e85ab7..4857925 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # React Selectize +## v2.0.1 / 11th April 2016 +## v2.0.0 / 11th April 2016 +* switched to major version semver +* added React@15.0 to peer deps +* abandoned git flow branching model + ## v0.9.0 / 18th March 2016 * added `on-paste` and `value-from-paste` props to `SimpleSelect` * added `highlighted-uid` and `on-highlighted-uid-change` props to track the current highlighted option diff --git a/README.md b/README.md index 7eb9b8c..a652f94 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ styles & features inspired by [React Select](http://jedwatson.github.io/react-se [![](http://i.imgsafe.co/rQmogzn.gif)](http://furqanZafar.github.io/react-selectize/) -- [Changelog](CHANGELOG.md) (last updated on 18th March 2016) +- [Changelog](CHANGELOG.md) (last updated on 11th April 2016) - [API Reference](API.md) # Motivation @@ -51,7 +51,7 @@ to include the default styles add the following import statement to your stylus `@import 'node_modules/react-selectize/themes/index.css'` * **bower:** -`bower install https://npmcdn.com/react-selectize@0.9.0/bower.zip` +`bower install https://npmcdn.com/react-selectize@2.0.1/bower.zip` * **1998 script tag:** ```html @@ -66,10 +66,10 @@ to include the default styles add the following import statement to your stylus - + - + diff --git a/bower.json b/bower.json index a00ff2f..61500a0 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-selectize", - "version": "0.9.0", + "version": "2.0.1", "homepage": "https://github.com/furqanZafar/react-selectize", "authors": [ "Furqan Zafar (Mac Pro) " diff --git a/package.json b/package.json index b4dd5cb..4b7b3f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-selectize", - "version": "0.9.0", + "version": "2.0.1", "description": "A Stateless & Flexible Select component for React inspired by Selectize", "main": "src/index.js", "scripts": { @@ -15,10 +15,10 @@ "tether": "^1.1.1" }, "peerDependencies": { - "react": "^0.14.0", - "react-addons-css-transition-group": "^0.14.0", - "react-addons-shallow-compare": "^0.14.0", - "react-dom": "^0.14.0" + "react": "^0.14.0 || ^15.0.0", + "react-addons-css-transition-group": "^0.14.0 || ^15.0.0", + "react-addons-shallow-compare": "^0.14.0 || ^15.0.0", + "react-dom": "^0.14.0 || ^15.0.0" }, "browserify-shim": { "prelude-extension": "global:preludeExtension", @@ -53,11 +53,11 @@ "mocha": "^2.3.3", "mocha-lcov-reporter": "^1.0.0", "nib": "^1.1.0", - "react": "^0.14.0", - "react-addons-css-transition-group": "^0.14.0", - "react-addons-shallow-compare": "^0.14.6", - "react-addons-test-utils": "^0.14.0", - "react-dom": "^0.14.0", + "react": "^0.14.0 || ^15.0.0", + "react-addons-css-transition-group": "^0.14.0 || ^15.0.0", + "react-addons-shallow-compare": "^0.14.0 || ^15.0.0", + "react-addons-test-utils": "^0.14.0 || ^15.0.0", + "react-dom": "^0.14.0 || ^15.0.0", "react-router": "^1.0.0-rc1", "react-tools": "^0.13.3", "run-sequence": "^1.1.5", diff --git a/public/examples/multi/Tether.ls b/public/examples/multi/Tether.ls index a201740..61a7ba1 100644 --- a/public/examples/multi/Tether.ls +++ b/public/examples/multi/Tether.ls @@ -1,27 +1,37 @@ # {MultiSelect} = require \react-selectize -Form = React.create-class do - +Form = React.create-class do + # render :: a -> ReactElement render: -> - div do + div do style: border: '1px solid #000', height: 100, overflow: \auto, padding: 20 # RANDOM TEXT - div do + div do style: padding: 20 "Lorem ipsum dolor sit amet, consectetur adipiscing elit" # MULTISELECT React.create-element MultiSelect, tether: true + React.create-element MultiSelect, + tether: true + tetherProps: + offset: '-20% -20%' # does nothing, why? + # TODO unable to get 'top right' to act properly + attachment: 'top right' + # demo the prop, works here. + target-attachment: 'bottom center' + options: <[apple mango grapes melon strawberry cherry banana kiwi]> |> map ~> label: it, value: it + placeholder: "Select fruits" options: <[apple mango grapes melon strawberry cherry banana kiwi]> |> map ~> label: it, value: it placeholder: "Select fruits" # RANDOM TEXT - div do + div do style: padding: 20 "Fusce aliquet dui tortor, imperdiet viverra augue pretium nec" -render (React.create-element Form, null), mount-node \ No newline at end of file +render (React.create-element Form, null), mount-node diff --git a/src/SimpleSelect.ls b/src/SimpleSelect.ls index 2033179..b1573a6 100644 --- a/src/SimpleSelect.ls +++ b/src/SimpleSelect.ls @@ -225,8 +225,8 @@ module.exports = React.create-class do open = @is-open! search = if @props.has-own-property \search then @props.search else @state.search value = @value! - values = if !!value then [value] else [] - + values = if (!!value || value == 0) then [value] else [] + # on-*-change :: a -> (() -> ()) -> () [ on-highlighted-uid-change diff --git a/test/simple-select.ls b/test/simple-select.ls index 4e42c81..bbe57ea 100644 --- a/test/simple-select.ls +++ b/test/simple-select.ls @@ -145,7 +145,7 @@ describe "SimpleSelect", -> name: \test click-to-open-select-control select click-option find-highlighted-option select - {value} = scry-rendered-DOM-components-with-tag select, \input + {value} = (scry-rendered-DOM-components-with-tag select, \input) |> find (.type == \hidden) assert \apple == value