Skip to content

Commit

Permalink
Fix #6922: fix input passthrough TS (#6938)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jul 27, 2024
1 parent c297a60 commit 0587fda
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions components/lib/calendar/calendar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as React from 'react';
import { CSSTransitionProps as ReactCSSTransitionProps } from 'react-transition-group/CSSTransition';
import { ComponentHooks } from '../componentbase/componentbase';
import { CSSTransitionProps } from '../csstransition';
import { InputText, InputTextPassThroughOptions } from '../inputtext/inputtext';
import { PassThroughOptions } from '../passthrough';
import { TooltipOptions } from '../tooltip/tooltipoptions';
import { FormEvent, Nullable } from '../ts-helpers';
Expand Down Expand Up @@ -41,7 +42,7 @@ export interface CalendarPassThroughOptions {
* Uses to pass attributes to the InputText component.
* @see {@link CalendarPassThroughType}
*/
input?: CalendarPassThroughType<React.HTMLAttributes<HTMLInputElement>>;
input?: InputTextPassThroughOptions;
/**
* Uses to pass attributes to the Button component.
* @see {@link CalendarPassThroughType}
Expand Down Expand Up @@ -1079,9 +1080,9 @@ export declare class Calendar extends React.Component<CalendarProps, any> {
public getElement(): HTMLSpanElement;
/**
* Used to get input element.
* @return {HTMLInputElement} Input element
* @return {InputText} Input element
*/
public getInput(): HTMLInputElement;
public getInput(): typeof InputText;
/**
* Used to get overlay element.
* @return {HTMLElement} Overlay element
Expand Down
7 changes: 4 additions & 3 deletions components/lib/cascadeselect/cascadeselect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { CSSTransitionProps as ReactCSSTransitionProps } from 'react-transition-
import { APIOptions } from '../api/api';
import { ComponentHooks } from '../componentbase/componentbase';
import { CSSTransitionProps } from '../csstransition';
import { InputText, InputTextPassThroughOptions } from '../inputtext/inputtext';
import { PassThroughOptions } from '../passthrough';
import { SelectItemOptionsType } from '../selectitem/selectitem';
import { IconType, PassThroughType } from '../utils/utils';
Expand Down Expand Up @@ -77,7 +78,7 @@ export interface CascadeSelectPassThroughOptions {
/**
* Uses to pass attributes to the input's DOM element.
*/
input?: CascadeSelectPassThroughType<React.HTMLAttributes<HTMLInputElement>>;
input?: InputTextPassThroughOptions;
/**
* Uses to pass attributes to the label's DOM element.
*/
Expand Down Expand Up @@ -352,9 +353,9 @@ export declare class CascadeSelect extends React.Component<CascadeSelectProps, a
public getElement(): HTMLDivElement;
/**
* Used to get input element.
* @return {HTMLInputElement} Input element
* @return {InputText} Input element
*/
public getInput(): HTMLInputElement;
public getInput(): typeof InputText;
/**
* Used to get overlay element.
* @return {HTMLElement} Overlay element
Expand Down
5 changes: 2 additions & 3 deletions components/lib/inputotp/inputotp.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
*/
import * as React from 'react';
import { ComponentHooks } from '../componentbase/componentbase';
import { KeyFilterType } from '../keyfilter';
import { InputTextPassThroughOptions } from '../inputtext/inputtext';
import { PassThroughOptions } from '../passthrough';
import { TooltipPassThroughOptions } from '../tooltip/tooltip';
import { TooltipOptions } from '../tooltip/tooltipoptions';
import { PassThroughType, TemplateType } from '../utils/utils';

export declare type InputOtpPassThroughType<T> = PassThroughType<T, InputOtpPassThroughMethodOptions>;
Expand All @@ -38,7 +37,7 @@ export interface InputOtpPassThroughOptions {
* Uses to pass attributes to the Tooltip component.
* @see {@link TooltipPassThroughOptions}
*/
input?: InputOtpPassThroughType<React.HTMLAttributes<HTMLInputElement>>;
input?: InputTextPassThroughOptions;
/**
* Used to manage all lifecycle hooks
* @see {@link ComponentHooks}
Expand Down

0 comments on commit 0587fda

Please sign in to comment.