Skip to content

Commit

Permalink
fix: rate autoFocus not work and blur error
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Jun 6, 2018
1 parent 228f447 commit c2c9841
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions components/rate/index.jsx
Expand Up @@ -13,6 +13,7 @@ export const RateProps = {
allowClear: PropTypes.bool,
disabled: PropTypes.bool,
character: PropTypes.any,
autoFocus: PropTypes.bool,
}

export default {
Expand Down
10 changes: 5 additions & 5 deletions components/vc-rate/src/Rate.jsx
Expand Up @@ -149,11 +149,11 @@ export default {
this.$refs.rateRef.focus()
}
},
// blur () {
// if (!this.disabled) {
// this.$refs.rateRef.blur()
// }
// },
blur () {
if (!this.disabled) {
this.$refs.rateRef.blur()
}
},
changeValue (value) {
if (!hasProp(this, 'value')) {
this.setState({
Expand Down

0 comments on commit c2c9841

Please sign in to comment.