mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2026-04-24 12:04:30 +08:00
fix: prevent closing the selector when clicking title and search box
This commit is contained in:
@@ -523,8 +523,11 @@ export function Selector<T>(props: {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className={styles["selector"]} onClick={() => props.onClose?.()}>
|
<div className={styles["selector"]} onClick={() => props.onClose?.()}>
|
||||||
<div className={styles["selector-content"]}>
|
<div
|
||||||
{/* todo: add searchbox */}
|
className={styles["selector-content"]}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
{/* title and search box */}
|
||||||
<div className={styles["selector-bar"]}>
|
<div className={styles["selector-bar"]}>
|
||||||
<div className={styles["selector-title"]}>
|
<div className={styles["selector-title"]}>
|
||||||
{Locale.UI.SelectorTitle}
|
{Locale.UI.SelectorTitle}
|
||||||
@@ -539,6 +542,7 @@ export function Selector<T>(props: {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/* list content */}
|
||||||
<List>
|
<List>
|
||||||
{filteredItems.length ? (
|
{filteredItems.length ? (
|
||||||
filteredItems.map((item, i) => {
|
filteredItems.map((item, i) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user