Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-5447] feat: add dataPreventOutsideClick prop to reafactor: ComboboxOptions for enhanced click handling #8112

Jayash Tripathy06300d1a8e36
diff --git a/packages/propel/src/combobox/combobox.tsx b/packages/propel/src/combobox/combobox.tsx
index d78b28e013..e2d6d005f7 100644
--- a/packages/propel/src/combobox/combobox.tsx
+++ b/packages/propel/src/combobox/combobox.tsx
@@ -38,6 +38,7 @@ export interface ComboboxOptionsProps {
searchQuery?: string;
onSearchQueryChange?: (query: string) => void;
onSearchQueryKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
+ dataPreventOutsideClick?: boolean;
}
export interface ComboboxOptionProps {
@@ -111,6 +112,7 @@ function ComboboxOptions({
searchQuery: controlledSearchQuery,
onSearchQueryChange,
onSearchQueryKeyDown,
+ dataPreventOutsideClick,
}: ComboboxOptionsProps) {
// const [searchQuery, setSearchQuery] = React.useState("");
const [internalSearchQuery, setInternalSearchQuery] = React.useState("");
@@ -164,6 +166,7 @@ function ComboboxOptions({
<BaseCombobox.Positioner sideOffset={8} className={positionerClassName}>
<BaseCombobox.Popup
className={cn("rounded-md border border-custom-border-200 bg-custom-background-100 p-1 shadow-lg", className)}
+ data-prevent-outside-click={dataPreventOutsideClick}
>
<div className="flex flex-col gap-1">
{showSearch && (