Skip to content

Commit

Permalink
Improve rootEventType type and export for EPS (#910)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkszepp authored Jun 5, 2024
1 parent b2fa37a commit c282ec0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ember-basic-dropdown/src/components/basic-dropdown-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import hasMoved from '../utils/has-moved.ts';
import { isTesting } from '@embroider/macros';
import { modifier } from 'ember-modifier';
import type { Dropdown } from './basic-dropdown.ts';
import type { Dropdown, TRootEventType } from './basic-dropdown.ts';
import { runTask } from 'ember-lifeline';

export interface BasicDropdownContentSignature {
Expand All @@ -26,7 +26,7 @@ export interface BasicDropdownContentSignature {
dropdown?: Dropdown;
renderInPlace?: boolean;
preventScroll?: boolean;
rootEventType?: 'click' | 'mousedown';
rootEventType?: TRootEventType;
top?: string | undefined;
left?: string | undefined;
right?: string | undefined;
Expand Down
4 changes: 3 additions & 1 deletion ember-basic-dropdown/src/components/basic-dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export interface Dropdown {
actions: DropdownActions;
}

export type TRootEventType = 'click' | 'mousedown';

const UNINITIALIZED = {};
const IGNORED_STYLES = ['top', 'left', 'right', 'width', 'height'];
interface BasicDropdownSignature {
Expand Down Expand Up @@ -61,7 +63,7 @@ interface BasicDropdownArgs {
destinationElement?: HTMLElement;
disabled?: boolean;
dropdownId?: string;
rootEventType?: string;
rootEventType?: TRootEventType;
preventScroll?: boolean;
matchTriggerWidth?: boolean;
// eslint-disable-next-line @typescript-eslint/ban-types
Expand Down

0 comments on commit c282ec0

Please sign in to comment.