Skip to content

Commit

Permalink
Fix value prop and make setProps optional in Select component (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kallekleiv authored Mar 28, 2021
1 parent 9d08a49 commit dd6dd2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED] - YYYY-MM-DD
### Fixed
- [#105](https://github.com/equinor/webviz-core-components/pull/105) - Fixed bug when updating Select values from a Dash callback.

## [0.3.0] - 2021-03-26
### Fixed
- [#99](https://github.com/equinor/webviz-core-components/pull/99) - Fixed bug which prevented using the download button in `WebvizPluginPlaceholder` and started to download when component was mounting.

### Added
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Select = (props: InferProps<typeof Select.propTypes>): JSX.Element => {
style={parent_style}
>
<select
defaultValue={value}
value={value}
multiple={multi}
size={size}
onChange={(e) => handleChange(e)}
Expand Down Expand Up @@ -129,7 +129,7 @@ Select.propTypes = {
/**
* Dash-assigned callback that gets fired when the input changes
*/
setProps: PropTypes.func.isRequired,
setProps: PropTypes.func,
/**
* Used to allow user interactions in this component to be persisted when
* the component - or the page - is refreshed. If `persisted` is truthy and
Expand Down

0 comments on commit dd6dd2f

Please sign in to comment.