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

Improve rootEventType type and export for EPS #910

Merged
merged 1 commit into from
Jun 5, 2024
Merged
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
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
Loading