diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af44d1d6..b311f548b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [0.37.0] - 2018-11-04 +### Fixed +- Some Input props weren't being picked up by React. Changed: + - `autocomplete` to `autoComplete` + - `autofocus` to `autoFocus` + - `inputmode` to `inputMode` + - `maxlength` to `maxLength` + - `minlength` to `minLength` +### Added +- Unit tests for `Input` component. +- New `debounce` prop for `Input` component that determines if the input should update to a Dash server immediately, or on 'Enter' key. Fixes [#169](https://github.com/plotly/dash-core-components/issues/169) +### Changed +- `min` and `max` prop now won't update the input when values are lower than or greater than `min` and `max` respectively. Fixes[#173](https://github.com/plotly/dash-core-components/issues/173) +- `step` prop can now be a `number` and is therefor set correctly on the corresponding `` tag. Fixes [#292](https://github.com/plotly/dash-core-components/issues/292) + ## [0.36.0] - 2018-11-01 ### Fixed - The `npm start` command now runs the Demo app again [#346](https://github.com/plotly/dash-core-components/issues/346) diff --git a/dash_core_components/Input.py b/dash_core_components/Input.py index 57d57ac12..5cecab72c 100644 --- a/dash_core_components/Input.py +++ b/dash_core_components/Input.py @@ -15,9 +15,11 @@ class Input(Component): - id (string; optional): The ID of this component, used to identify dash components in callbacks. The ID needs to be unique across all of the components in an app. -- value (string; optional): The value of the input +- value (string | number; optional): The value of the input - style (dict; optional): The input's inline styles - className (string; optional): The class of the input element +- debounce (boolean; optional): If true, changes to input will be sent back to the Dash server only on enter or when losing focus. +If it's false, it will sent the value back on every change. - type (a value equal to: "text", 'number', 'password', 'email', 'range', 'search', 'tel', 'url', 'hidden'; optional): The type of control to render. - autocomplete (string; optional): This attribute indicates whether the value of the control can be automatically completed by the browser. - autofocus (string; optional): The element should be automatically focused after the page loaded. @@ -29,11 +31,11 @@ class Input(Component): input element. This attribute is ignored when the type attribute's value is hidden, checkbox, radio, file, or a button type. -- max (string; optional): The maximum (numeric or date-time) value for this item, which must not be less than its minimum (min attribute) value. +- max (string | number; optional): The maximum (numeric or date-time) value for this item, which must not be less than its minimum (min attribute) value. - maxlength (string; optional): If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the maximum number of characters (in UTF-16 code units) that the user can enter. For other control types, it is ignored. It can exceed the value of the size attribute. If it is not specified, the user can enter an unlimited number of characters. Specifying a negative number results in the default behavior (i.e. the user can enter an unlimited number of characters). The constraint is evaluated only when the value of the attribute has been changed. -- min (string; optional): The minimum (numeric or date-time) value for this item, which must not be greater than its maximum (max attribute) value. +- min (string | number; optional): The minimum (numeric or date-time) value for this item, which must not be greater than its maximum (max attribute) value. - minlength (string; optional): If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the minimum number of characters (in Unicode code points) that the user can enter. For other control types, it is ignored. -- multiple (string; optional): This Boolean attribute indicates whether the user can enter more than one value. This attribute applies when the type attribute is set to email or file, otherwise it is ignored. +- multiple (boolean; optional): This Boolean attribute indicates whether the user can enter more than one value. This attribute applies when the type attribute is set to email or file, otherwise it is ignored. - name (string; optional): The name of the control, which is submitted with the form data. - pattern (string; optional): A regular expression that the control's value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is text, search, tel, url, email, or password, otherwise it is ignored. The regular expression language is the same as JavaScript RegExp algorithm, with the 'u' parameter that makes it treat the pattern as a sequence of unicode code points. The pattern is not surrounded by forward slashes. - placeholder (string; optional): A hint to the user of what can be entered in the control . The placeholder text must not contain carriage returns or line-feeds. Note: Do not use the placeholder attribute instead of a