web: components: fix InputBlock
This commit is contained in:
parent
8677d3c236
commit
d87ed5b532
@ -45,9 +45,9 @@ const StyledInputGroup = styled(CustomInputGroup)`
|
||||
const InputBlock = React.forwardRef((props, ref) => {
|
||||
//console.log("InputBlock render");
|
||||
const { onChange, value, children, size } = props;
|
||||
|
||||
|
||||
let iconButtonSize = 0;
|
||||
|
||||
|
||||
if (typeof props.iconSize == "number" && props.iconSize > 0) {
|
||||
iconButtonSize = props.iconSize;
|
||||
} else {
|
||||
@ -82,6 +82,9 @@ const InputBlock = React.forwardRef((props, ref) => {
|
||||
</StyledChildrenBlock>
|
||||
</InputGroupAddon>
|
||||
<TextInput
|
||||
id={props.id}
|
||||
name={props.name}
|
||||
type={props.type}
|
||||
value={value}
|
||||
isDisabled={props.isDisabled}
|
||||
hasError={props.hasError}
|
||||
@ -105,13 +108,13 @@ const InputBlock = React.forwardRef((props, ref) => {
|
||||
&&
|
||||
<InputGroupAddon addonType="append">
|
||||
<StyledIconBlock>
|
||||
<IconButton
|
||||
size={iconButtonSize}
|
||||
color={props.iconColor}
|
||||
iconName={props.iconName}
|
||||
isFill={props.isIconFill}
|
||||
isDisabled={props.isDisabled}
|
||||
onClick={typeof props.onIconClick == 'function' ? onIconClick : undefined } />
|
||||
<IconButton
|
||||
size={iconButtonSize}
|
||||
color={props.iconColor}
|
||||
iconName={props.iconName}
|
||||
isFill={props.isIconFill}
|
||||
isDisabled={props.isDisabled}
|
||||
onClick={typeof props.onIconClick == 'function' ? onIconClick : undefined} />
|
||||
</StyledIconBlock>
|
||||
</InputGroupAddon>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user