Fix linter errors
parent
3da8d9e595
commit
33ff49119b
|
@ -11,6 +11,10 @@ class DatePicker extends React.Component {
|
|||
autoOk: React.PropTypes.bool,
|
||||
className: React.PropTypes.string,
|
||||
error: React.PropTypes.string,
|
||||
icon: React.PropTypes.oneOfType([
|
||||
React.PropTypes.string,
|
||||
React.PropTypes.element
|
||||
]),
|
||||
inputClassName: React.PropTypes.string,
|
||||
inputFormat: React.PropTypes.func,
|
||||
label: React.PropTypes.string,
|
||||
|
@ -20,10 +24,6 @@ class DatePicker extends React.Component {
|
|||
value: React.PropTypes.oneOfType([
|
||||
React.PropTypes.instanceOf(Date),
|
||||
React.PropTypes.string
|
||||
]),
|
||||
icon: React.PropTypes.oneOfType([
|
||||
React.PropTypes.string,
|
||||
React.PropTypes.element
|
||||
])
|
||||
};
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ class Table extends React.Component {
|
|||
className: React.PropTypes.string,
|
||||
heading: React.PropTypes.bool,
|
||||
model: React.PropTypes.object,
|
||||
multiSelectable: React.PropTypes.bool,
|
||||
onChange: React.PropTypes.func,
|
||||
onSelect: React.PropTypes.func,
|
||||
selectable: React.PropTypes.bool,
|
||||
multiSelectable: React.PropTypes.bool,
|
||||
selected: React.PropTypes.array,
|
||||
source: React.PropTypes.array
|
||||
};
|
||||
|
@ -37,11 +37,8 @@ class Table extends React.Component {
|
|||
if (this.props.onSelect) {
|
||||
const position = this.props.selected.indexOf(index);
|
||||
let newSelected = [...this.props.selected];
|
||||
|
||||
if (position !== -1) {
|
||||
newSelected.splice(position, 1);
|
||||
}
|
||||
else if (this.props.multiSelectable) {
|
||||
if (position !== -1) { newSelected.splice(position, 1); }
|
||||
if (position !== -1 && this.props.multiSelectable) {
|
||||
newSelected.push(index);
|
||||
} else {
|
||||
newSelected = [index];
|
||||
|
|
Loading…
Reference in New Issue