Fixed: Other Misc Improvements

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick 2019-08-04 22:57:30 -04:00
parent 2366ce0931
commit 72947029f4
7 changed files with 21 additions and 8 deletions

View file

@ -37,6 +37,7 @@
.suggestionsList {
margin: 5px 0;
padding-left: 0;
max-height: 200px;
list-style-type: none;
}

View file

@ -1,4 +1,3 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
@ -13,7 +12,7 @@ function createMapStateToProps() {
(state) => state.rootFolders,
(state, { includeNoChange }) => includeNoChange,
(rootFolders, includeNoChange) => {
const values = _.map(rootFolders.items, (rootFolder) => {
const values = rootFolders.items.map((rootFolder) => {
return {
key: rootFolder.path,
value: rootFolder.path,
@ -85,7 +84,7 @@ class RootFolderSelectInputConnector extends Component {
onChange
} = this.props;
if (!value || !_.some(values, (v) => v.key === value) || value === ADD_NEW_KEY) {
if (!value || !values.some((v) => v.key === value) || value === ADD_NEW_KEY) {
const defaultValue = values[0];
if (defaultValue.key === ADD_NEW_KEY) {

View file

@ -128,6 +128,8 @@ class TextInput extends Component {
hasWarning,
hasButton,
step,
min,
max,
onBlur
} = this.props;
@ -148,6 +150,8 @@ class TextInput extends Component {
name={name}
value={value}
step={step}
min={min}
max={max}
onChange={this.onChange}
onFocus={this.onFocus}
onBlur={onBlur}
@ -171,6 +175,8 @@ TextInput.propTypes = {
hasWarning: PropTypes.bool,
hasButton: PropTypes.bool,
step: PropTypes.number,
min: PropTypes.number,
max: PropTypes.number,
onChange: PropTypes.func.isRequired,
onFocus: PropTypes.func,
onBlur: PropTypes.func,