Skip to content

Commit

Permalink
Fix primefaces#2408: AutoComplete/InputMask maxlength to maxLength
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Nov 9, 2021
1 parent 6dcece3 commit c8a0c52
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/autocomplete/AutoComplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export interface AutoCompleteProps {
placeholder?: string;
readOnly?: boolean;
disabled?: boolean;
maxlength?: number;
maxLength?: number;
size?: number;
appendTo?: AutoCompleteAppendToType;
tabIndex?: number;
Expand Down
8 changes: 4 additions & 4 deletions src/components/autocomplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class AutoComplete extends Component {
placeholder: null,
readOnly: false,
disabled: false,
maxlength: null,
maxLength: null,
size: null,
appendTo: null,
tabIndex: null,
Expand Down Expand Up @@ -101,7 +101,7 @@ export class AutoComplete extends Component {
placeholder: PropTypes.string,
readOnly: PropTypes.bool,
disabled: PropTypes.bool,
maxlength: PropTypes.number,
maxLength: PropTypes.number,
size: PropTypes.number,
appendTo: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
tabIndex: PropTypes.number,
Expand Down Expand Up @@ -747,7 +747,7 @@ export class AutoComplete extends Component {
defaultValue={this.formatValue(this.props.value)} role="searchbox" aria-autocomplete="list" aria-controls={this.state.id + '_list'}
aria-labelledby={this.props.ariaLabelledBy} className={inputClassName} style={this.props.inputStyle} autoComplete="off"
readOnly={this.props.readOnly} disabled={this.props.disabled} placeholder={this.props.placeholder} size={this.props.size}
maxLength={this.props.maxlength} tabIndex={this.props.tabIndex}
maxLength={this.props.maxLength} tabIndex={this.props.tabIndex}
onBlur={this.onInputBlur} onFocus={this.onInputFocus} onChange={this.onInputChange}
onMouseDown={this.props.onMouseDown} onKeyUp={this.props.onKeyUp} onKeyDown={this.onInputKeyDown}
onKeyPress={this.props.onKeyPress} onContextMenu={this.props.onContextMenu}
Expand Down Expand Up @@ -776,7 +776,7 @@ export class AutoComplete extends Component {
<input ref={this.inputRef} type={this.props.type} disabled={this.props.disabled} placeholder={this.props.placeholder}
role="searchbox" aria-autocomplete="list" aria-controls={this.state.id + '_list'} aria-labelledby={this.props.ariaLabelledBy}
autoComplete="off" tabIndex={this.props.tabIndex} onChange={this.onInputChange} id={this.props.inputId} name={this.props.name}
style={this.props.inputStyle} className={this.props.inputClassName} maxLength={this.props.maxlength}
style={this.props.inputStyle} className={this.props.inputClassName} maxLength={this.props.maxLength}
onKeyUp={this.props.onKeyUp} onKeyDown={this.onInputKeyDown} onKeyPress={this.props.onKeyPress}
onFocus={this.onMultiInputFocus} onBlur={this.onMultiInputBlur} />
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/components/inputmask/InputMask.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface InputMaskProps {
className?: string;
placeholder?: string;
size?: number;
maxlength?: number;
maxLength?: number;
tabIndex?: number;
disabled?: boolean;
readOnly?: boolean;
Expand Down
6 changes: 3 additions & 3 deletions src/components/inputmask/InputMask.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class InputMask extends Component {
className: null,
placeholder: null,
size: null,
maxlength: null,
maxLength: null,
tabIndex: null,
disabled: false,
readOnly: false,
Expand Down Expand Up @@ -47,7 +47,7 @@ export class InputMask extends Component {
className: PropTypes.string,
placeholder: PropTypes.string,
size: PropTypes.number,
maxlength: PropTypes.number,
maxLength: PropTypes.number,
tabIndex: PropTypes.number,
disabled: PropTypes.bool,
readOnly: PropTypes.bool,
Expand Down Expand Up @@ -629,7 +629,7 @@ export class InputMask extends Component {
let inputMaskClassName = classNames('p-inputmask', this.props.className);
return (
<InputText id={this.props.id} ref={this.inputRef} type={this.props.type} name={this.props.name} style={this.props.style} className={inputMaskClassName} placeholder={this.props.placeholder}
size={this.props.size} maxLength={this.props.maxlength} tabIndex={this.props.tabIndex} disabled={this.props.disabled} readOnly={this.props.readOnly}
size={this.props.size} maxLength={this.props.maxLength} tabIndex={this.props.tabIndex} disabled={this.props.disabled} readOnly={this.props.readOnly}
onFocus={this.onFocus} onBlur={this.onBlur} onKeyDown={this.onKeyDown} onKeyPress={this.onKeyPress}
onInput={this.onInput} onPaste={this.handleInputChange} required={this.props.required} aria-labelledby={this.props.ariaLabelledBy} />
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ export class InputNumber extends Component {
return (
<InputText ref={this.inputRef} id={this.props.inputId} style={this.props.inputStyle} role="spinbutton"
className={className} defaultValue={valueToRender} type={this.props.type} size={this.props.size} tabIndex={this.props.tabIndex} inputMode={this.getInputMode()}
maxLength={this.props.maxlength} disabled={this.props.disabled} required={this.props.required} pattern={this.props.pattern}
maxLength={this.props.maxLength} disabled={this.props.disabled} required={this.props.required} pattern={this.props.pattern}
placeholder={this.props.placeholder} readOnly={this.props.readOnly} name={this.props.name} autoFocus={this.props.autoFocus}
onKeyDown={this.onInputKeyDown} onKeyPress={this.onInputKeyPress} onInput={this.onInput} onClick={this.onInputClick}
onBlur={this.onInputBlur} onFocus={this.onInputFocus} onPaste={this.onPaste} min={this.props.min} max={this.props.max}
Expand Down
2 changes: 1 addition & 1 deletion src/showcase/autocomplete/AutoCompleteDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ itemTemplate(item) {
<td>When present, it specifies that the component should be disabled.</td>
</tr>
<tr>
<td>maxlength</td>
<td>maxLength</td>
<td>number</td>
<td>null</td>
<td>Maximum number of character allows in the input field.</td>
Expand Down
2 changes: 1 addition & 1 deletion src/showcase/inputmask/InputMaskDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ import { InputMask } from 'primereact/inputmask';
<td>Size of the input field.</td>
</tr>
<tr>
<td>maxlength</td>
<td>maxLength</td>
<td>number</td>
<td>null</td>
<td>Maximum number of character allows in the input field.</td>
Expand Down

0 comments on commit c8a0c52

Please sign in to comment.