Skip to content
Permalink
Browse files

fix(ui): correct select widget title position

fix #2709
  • Loading branch information...
mrfelton committed Aug 8, 2019
1 parent 702e00d commit 8b285a9039314189a2913d1f825c25280ccec8c4
Showing with 16 additions and 0 deletions.
  1. +16 −0 renderer/components/UI/Select.js
@@ -14,6 +14,7 @@ import AngleUp from 'components/Icon/AngleUp'
import AngleDown from 'components/Icon/AngleDown'
import Text from './Text'
import { BasicInput } from './Input'
import InputLabel from './InputLabel'
import messages from './messages'

const SelectOptionList = styled.ul`
@@ -116,7 +117,11 @@ const Select = props => {
fieldApi,
fieldState,
iconSize,
isRequired,
theme,
label,
field,
tooltip,
color,
onValueSelected,
initialSelectedItem: initialSelectedItemOriginal,
@@ -177,8 +182,15 @@ const Select = props => {

return (
<div style={{ position: 'relative' }}>
{label && (
<InputLabel field={field} isRequired={isRequired} tooltip={tooltip}>
{label}
</InputLabel>
)}
<Flex alignItems="center">
<StyledInput
field={field}
isRequired={isRequired}
placeholder={intl.formatMessage({ ...messages.select_placeholder })}
{...rest}
initialValue={getInitialValue()}
@@ -209,15 +221,19 @@ const Select = props => {

Select.propTypes = {
color: PropTypes.string,
field: PropTypes.string.isRequired,
fieldApi: PropTypes.object.isRequired,
fieldState: PropTypes.object.isRequired,
iconSize: PropTypes.number,
initialSelectedItem: PropTypes.string,
intl: intlShape.isRequired,
isRequired: PropTypes.bool,
items: PropTypes.array,
label: PropTypes.string,
messageMapper: PropTypes.func,
onValueSelected: PropTypes.func,
theme: PropTypes.object.isRequired,
tooltip: PropTypes.string,
}

Select.defaultProps = {

0 comments on commit 8b285a9

Please sign in to comment.
You can’t perform that action at this time.