Skip to content

Commit

Permalink
Fixed #1323 - ColorPicker: add missing input attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Jun 4, 2020
1 parent e01c9c0 commit 2cc9a8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/colorpicker/ColorPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import DomHandler from '../utils/DomHandler';
import classNames from 'classnames';
import {ColorPickerPanel} from './ColorPickerPanel';
import Tooltip from "../tooltip/Tooltip";
import ObjectUtils from '../utils/ObjectUtils';

export class ColorPicker extends Component {

Expand Down Expand Up @@ -546,9 +547,11 @@ export class ColorPicker extends Component {
'p-disabled': this.props.disabled
});

let inputProps = ObjectUtils.findDiffKeys(this.props, ColorPicker.defaultProps);

return (
<input ref={(el) => this.input = el} type="text" className={inputClassName} readOnly="readonly" id={this.props.inputId} tabIndex={this.props.tabIndex} disabled={this.props.disabled}
onClick={this.onInputClick} onKeyDown={this.onInputKeydown} />
onClick={this.onInputClick} onKeyDown={this.onInputKeydown} {...inputProps}/>
);
}
else {
Expand Down

0 comments on commit 2cc9a8b

Please sign in to comment.