Skip to content

Commit

Permalink
Merge pull request #1505 from KleeGroup/develop
Browse files Browse the repository at this point in the history
Release 2.2.1
  • Loading branch information
Hartorn authored Nov 15, 2017
2 parents 303d95b + fa01ded commit 441f0cc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "focus-components",
"version": "2.2.0",
"version": "2.2.1",
"description": "Focus component repository.",
"main": "index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/components/dropdown/action-menu.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import React, { Component } from 'react';
import Button from '../../components/button';
import { translate } from 'focus-core/translation';
import noop from 'lodash/utility/noop'

import Button from '../../components/button';
import MDBehaviour from '../../behaviours/material';

@MDBehaviour('dropdown')
/**
* Action menu component
*
Expand Down
23 changes: 0 additions & 23 deletions src/components/dropdown/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React, { Component, PropTypes } from 'react';
import ReactDOM from 'react-dom';

import uuid from 'uuid';
import 'material-design-lite/material';

import ActionMenu from './action-menu';

Expand All @@ -28,27 +26,6 @@ class Dropdown extends Component {
this._htmlId = uuid.v4();
}

/** @inheritdoc */
componentDidMount() {
if (0 !== this.props.operationList.length && ReactDOM.findDOMNode(this.refs.dropdown)) {
componentHandler.upgradeElement(ReactDOM.findDOMNode(this.refs.dropdown));
}
}

/** @inheritdoc */
componentWillReceiveProps(nextProps) {
if (0 !== nextProps.operationList.length && ReactDOM.findDOMNode(this.refs.dropdown)) {
componentHandler.upgradeElement(ReactDOM.findDOMNode(this.refs.dropdown));
}
}

/** @inheritdoc */
componentWillUnmount() {
if (0 !== this.props.operationList.length && ReactDOM.findDOMNode(this.refs.dropdown)) {
componentHandler.downgradeElements(ReactDOM.findDOMNode(this.refs.dropdown));
}
}

/** @inheritdoc */
render() {
const { iconProps, operationList, position, shape } = this.props;
Expand Down
7 changes: 6 additions & 1 deletion src/components/input/autocomplete-select-multiple/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ class MultiAutocomplete extends Component {
*/
validate() {
// do nothing, validation is done at each selection
return true;
const { isRequired } = this.props;
return ({
isValid: !isRequired || (this.props.value && this.props.value.length > 0),
message: 'field.required'
});

}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//Generator http://patorjk.com/software/taag/#p=display&h=1&f=Banner4&t=Focus-COMPONENTS
import './style';
// import './style';
import translation from 'focus-core/translation';
import history from 'focus-core/history';

Expand Down

0 comments on commit 441f0cc

Please sign in to comment.