Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #5283: InputText size TS fix #5284

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion components/lib/inputtext/inputtext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ export interface InputTextContext {
* Defines valid properties in InputText component. In addition to these, all properties of HTMLInputElement can be used in this component.
* @group Properties
*/
export interface InputTextProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'onInput' | 'ref' | 'value'> {
export interface InputTextProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'onInput' | 'ref' | 'value' | 'size'> {
/**
* Format definition of the keys to block.
*/
keyfilter?: KeyFilterType;
/**
* Size of the input.
*/
size?: number | string | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern about allowing string is the Liskov Substitution Principle. Although, short term I agree it solves the problem.

/**
* Content of the tooltip.
*/
Expand Down
Loading