Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
import {
ClickEvent,
GeneralEvent,
GeneralKeyboardEvent,
InputEvent,
InteractionEvent
} from '../../shared/model';
Expand Down Expand Up @@ -406,7 +407,9 @@ export default function DBCustomSelect(props: DBCustomSelectProps) {
event.stopPropagation();
event.preventDefault();
},
handleKeyboardPress: (event: any) => {
handleKeyboardPress: (
event: GeneralKeyboardEvent<HTMLDetailsElement>
) => {
event.stopPropagation();
if (event.key === 'Escape' && detailsRef?.open) {
state.handleClose(undefined, true);
Expand Down
20 changes: 13 additions & 7 deletions packages/components/src/components/custom-select/model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
BaseFormProps,
ChangeEvent,
ClickEvent,
CloseEventState,
CustomFormProps,
Expand All @@ -8,6 +9,7 @@ import {
FormState,
FromValidState,
GeneralEvent,
GeneralKeyboardEvent,
GlobalProps,
GlobalState,
IconProps,
Expand Down Expand Up @@ -282,15 +284,19 @@ export type DBCustomSelectDefaultState = {
) => void;
handleSummaryFocus: () => void;
handleSelect: (value?: string) => void;
handleSelectAll: (event: any) => void;
handleClearAll: (event: any) => void;
handleDropdownToggle: (event: any) => void;
handleDocumentClose: (event: any) => void;
handleSelectAll: (event: ChangeEvent<HTMLInputElement>) => void;
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The type signature for handleSelectAll has been updated in model.ts, but the implementation on line 529 still uses any. Please update the implementation to match the new type:

handleSelectAll: (event: ChangeEvent<HTMLInputElement>) => {

Copilot uses AI. Check for mistakes.
handleClearAll: (event: ClickEvent<HTMLButtonElement>) => void;
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The type signature for handleClearAll has been updated in model.ts, but the implementation on line 636 still uses any. Please update the implementation to match the new type:

handleClearAll: (event: ClickEvent<HTMLButtonElement>) => {

Copilot uses AI. Check for mistakes.
handleDropdownToggle: (event: GeneralEvent<HTMLDetailsElement>) => void;
handleDocumentClose: (event: GeneralEvent<HTMLElement>) => void;
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The type signature for handleDocumentClose has been updated to GeneralEvent<HTMLElement> (which is Event), but the implementation on line 463 accesses event.detail which is not present on the standard Event type. This property exists on CustomEvent. The type should likely be:

handleDocumentClose: (event: CustomEvent | Event) => void;

Or use a union type that properly supports the Stencil custom event pattern shown in the implementation.

Suggested change
handleDocumentClose: (event: GeneralEvent<HTMLElement>) => void;
handleDocumentClose: (event: CustomEvent<any> | Event) => void;

Copilot uses AI. Check for mistakes.
handleOpenByKeyboardFocus: () => void;
handleFocusFirstDropdownCheckbox: (activeElement?: Element) => void;
handleKeyboardPress: (event: any) => void;
handleArrowDownUp: (event: any) => void;
handleSearch: (event: any) => void;
handleKeyboardPress: (
event: GeneralKeyboardEvent<HTMLDetailsElement>
) => void;
handleArrowDownUp: (event: GeneralKeyboardEvent<HTMLElement>) => void;
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The type signature for handleArrowDownUp has been updated in model.ts, but the implementation on line 288 still uses any. Please update the implementation to match the new type:

handleArrowDownUp: (event: GeneralKeyboardEvent<HTMLElement>) => {

Copilot uses AI. Check for mistakes.
handleSearch: (
valueOrEvent?: InputEvent<HTMLInputElement> | string | void
) => void;
handleOptionSelected: (_values: string[]) => void;
getSelectAllLabel: () => string;
selectAllChecked: boolean;
Expand Down