From 8ac7425d990daf4a0f471a98dca5d3a7e9924885 Mon Sep 17 00:00:00 2001 From: melloware Date: Wed, 13 Mar 2024 14:49:17 -0400 Subject: [PATCH] Fix #6145: AutoComplete change event typedef --- components/lib/autocomplete/autocomplete.d.ts | 2 +- components/lib/checkbox/Checkbox.js | 2 +- components/lib/checkbox/CheckboxBase.js | 1 - components/lib/checkbox/checkbox.d.ts | 1 - components/lib/radiobutton/radiobutton.d.ts | 1 + components/lib/togglebutton/togglebutton.d.ts | 3 ++- components/lib/tristatecheckbox/tristatecheckbox.d.ts | 1 + 7 files changed, 6 insertions(+), 5 deletions(-) diff --git a/components/lib/autocomplete/autocomplete.d.ts b/components/lib/autocomplete/autocomplete.d.ts index da565f89f4..2341456751 100755 --- a/components/lib/autocomplete/autocomplete.d.ts +++ b/components/lib/autocomplete/autocomplete.d.ts @@ -227,7 +227,7 @@ export interface AutoCompleteContext { * Defines valid properties in AutoComplete component. In addition to these, all properties of HTMLSpanElement can be used in this component. * @group Properties */ -export interface AutoCompleteProps extends Omit, HTMLSpanElement>, 'onChange' | 'onSelect' | 'ref'> { +export interface AutoCompleteProps extends Omit, HTMLSpanElement>, 'onChange' | 'onSelect' | 'ref'> { /** * Unique identifier of the element. */ diff --git a/components/lib/checkbox/Checkbox.js b/components/lib/checkbox/Checkbox.js index 63a1d56e8d..bbc98352d2 100644 --- a/components/lib/checkbox/Checkbox.js +++ b/components/lib/checkbox/Checkbox.js @@ -21,7 +21,7 @@ export const Checkbox = React.memo( }); useHandleStyle(CheckboxBase.css.styles, isUnstyled, { name: 'checkbox' }); - + const elementRef = React.useRef(null); const inputRef = React.useRef(props.inputRef); diff --git a/components/lib/checkbox/CheckboxBase.js b/components/lib/checkbox/CheckboxBase.js index 1103da19af..4eb62ff033 100644 --- a/components/lib/checkbox/CheckboxBase.js +++ b/components/lib/checkbox/CheckboxBase.js @@ -14,7 +14,6 @@ const classes = { }) }; - export const CheckboxBase = ComponentBase.extend({ defaultProps: { __TYPE: 'Checkbox', diff --git a/components/lib/checkbox/checkbox.d.ts b/components/lib/checkbox/checkbox.d.ts index db831cb5a4..27466145af 100644 --- a/components/lib/checkbox/checkbox.d.ts +++ b/components/lib/checkbox/checkbox.d.ts @@ -74,7 +74,6 @@ export interface CheckboxContext { disabled: boolean; } - /** * Custom change event. * @see {@link CheckboxProps.onChange} diff --git a/components/lib/radiobutton/radiobutton.d.ts b/components/lib/radiobutton/radiobutton.d.ts index 20cd34d8a2..b2324eccb7 100644 --- a/components/lib/radiobutton/radiobutton.d.ts +++ b/components/lib/radiobutton/radiobutton.d.ts @@ -8,6 +8,7 @@ * */ import * as React from 'react'; +import { CheckboxPassThroughType } from '../checkbox/checkbox'; import { ComponentHooks } from '../componentbase/componentbase'; import { PassThroughOptions } from '../passthrough'; import { TooltipPassThroughOptions } from '../tooltip/tooltip'; diff --git a/components/lib/togglebutton/togglebutton.d.ts b/components/lib/togglebutton/togglebutton.d.ts index c4327b135e..b28df7858a 100644 --- a/components/lib/togglebutton/togglebutton.d.ts +++ b/components/lib/togglebutton/togglebutton.d.ts @@ -8,6 +8,7 @@ * */ import * as React from 'react'; +import { CheckboxPassThroughType } from '../checkbox/checkbox'; import { ComponentHooks } from '../componentbase/componentbase'; import { PassThroughOptions } from '../passthrough'; import { TooltipPassThroughOptions } from '../tooltip/tooltip'; @@ -53,7 +54,7 @@ export interface ToggleButtonPassThroughOptions { /** * Uses to pass attributes to the input's DOM element. */ - input?: RadioButtonPassThroughType>; + input?: ToggleButtonPassThroughType>; /** * Used to pass attributes to the box's DOM element. */ diff --git a/components/lib/tristatecheckbox/tristatecheckbox.d.ts b/components/lib/tristatecheckbox/tristatecheckbox.d.ts index 3279f16033..82c3931158 100644 --- a/components/lib/tristatecheckbox/tristatecheckbox.d.ts +++ b/components/lib/tristatecheckbox/tristatecheckbox.d.ts @@ -8,6 +8,7 @@ * */ import * as React from 'react'; +import { CheckboxPassThroughType } from '../checkbox/checkbox'; import { ComponentHooks } from '../componentbase/componentbase'; import { PassThroughOptions } from '../passthrough'; import { TooltipPassThroughOptions } from '../tooltip/tooltip';