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

Implement OnyxSelect advanced async API #1649

Open
BoppLi opened this issue Jul 29, 2024 · 0 comments
Open

Implement OnyxSelect advanced async API #1649

BoppLi opened this issue Jul 29, 2024 · 0 comments
Assignees
Labels
dev Requires technical expertise
Milestone

Comments

@BoppLi
Copy link
Contributor

BoppLi commented Jul 29, 2024

After we gathered some real-life project experience/feedback of OnyxSelect within an async context, we should rethink if we offer a more extensive control and stricter required types when OnxySelect is used with asynchronous data.

See #1564 (comment)

Initial draft was:

      withSearch: true | {
        /**
         * A filter function for synchronous filtering of the provided `options`. 
         * The default filter function will compare
         * the option labels with the `searchTerm`.
         */
        filterFunc: (option: SelectOption<TValue>, index: number, array: SelectOption<TValue>[]) => boolean;
      };
type Async = {
    async: true;
    debounce?: number;
    initialOption: SelectOption<TValue>;
    loadingLabel: string;
    request: (searchTerm: string, pagination: Pagination, abortSignal: AbortSignal) => SelectOption<TValue>[];
}
@BoppLi BoppLi added the dev Requires technical expertise label Jul 29, 2024
@BoppLi BoppLi added this to the Combo boxes milestone Jul 29, 2024
@JoCa96 JoCa96 self-assigned this Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Requires technical expertise
Projects
Status: New
Development

No branches or pull requests

2 participants