Skip to content

Commit

Permalink
Merge branch 'release/2.0.0-alpha.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
twisty committed Sep 11, 2019
2 parents cef6609 + 6afea95 commit db069ca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "formsy-react-components",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "Bootstrap components for a formsy-react form.",
"scripts": {
"test": "jest",
Expand Down Expand Up @@ -37,7 +37,7 @@
"url": "https://github.com/twisty/formsy-react-components/issues"
},
"peerDependencies": {
"formsy-react": "^2.0.0-beta.2",
"formsy-react": "formsy/formsy-react#cbce6b1",
"react": "^16.3.0"
},
"dependencies": {
Expand All @@ -62,7 +62,7 @@
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-react": "^7.14.2",
"formsy-react": "^2.0.0-beta.2",
"formsy-react": "formsy/formsy-react#cbce6b1",
"gh-pages": "^2.0.0",
"jest": "^24.1.0",
"prettier": "^1.6.1",
Expand Down
6 changes: 6 additions & 0 deletions src/components/select.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import classNames from 'classnames/dedupe';
import {componentDefaultProps} from './component-common';
import ErrorMessages from './error-messages';
import Help from './help';
Expand Down Expand Up @@ -47,21 +48,26 @@ class Select extends React.Component<SelectProps, {}> {

public render(): JSX.Element {
const {
className,
errorMessages,
help,
id,
layout,
name,
required,
showErrors,
...inputProps
} = this.props;
Object.keys(componentDefaultProps).forEach((key): void => {
delete inputProps[key];
});

const markAsInvalid = showErrors && (errorMessages.length > 0 || required);

const control = (
<SelectControl
{...inputProps}
className={classNames(markAsInvalid ? ['is-invalid', className] : className)}
elementRef={this.props.elementRef}
id={id}
name={name}
Expand Down
5 changes: 2 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2828,10 +2828,9 @@ form-data@~2.3.2:
combined-stream "^1.0.6"
mime-types "^2.1.12"

formsy-react@^2.0.0-beta.2:
formsy-react@formsy/formsy-react#cbce6b1:
version "2.0.0-beta.4"
resolved "https://registry.yarnpkg.com/formsy-react/-/formsy-react-2.0.0-beta.4.tgz#14c95f26c2d607f1d1a447362680e73a692d20b3"
integrity sha512-6o42LbZ6IO8UQIBGQaOoo0yjYfr1rDSv2fKNgRXZHQTGWoZU8vnBe7RttCCIxYp5AeTO67A86SGiAmsKsqh+/A==
resolved "https://codeload.github.com/formsy/formsy-react/tar.gz/cbce6b1f7ff8b3721ccf22d05f3aba0b7c9185f4"
dependencies:
form-data-to-object "^0.2.0"
prop-types "^15.7.2"
Expand Down

0 comments on commit db069ca

Please sign in to comment.