fix: 筛选面板点击外部区域也能关闭
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

恢复backdrop的onClick,点击遮罩层关闭对应的筛选面板。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-29 00:00:16 +08:00
parent 9f3b134007
commit 6bdbfda981

View File

@@ -1040,7 +1040,7 @@ export default function App() {
<AnimatePresence> <AnimatePresence>
{isInventoryFilterOpen && ( {isInventoryFilterOpen && (
<> <>
<div className="fixed inset-0 z-40" /> <div className="fixed inset-0 z-40" onClick={() => setIsInventoryFilterOpen(false)} />
<motion.div <motion.div
initial={{ opacity: 0, y: 10, scale: 0.95 }} initial={{ opacity: 0, y: 10, scale: 0.95 }}
animate={{ opacity: 1, y: 0, scale: 1 }} animate={{ opacity: 1, y: 0, scale: 1 }}
@@ -1971,7 +1971,7 @@ export default function App() {
<AnimatePresence> <AnimatePresence>
{isRegionFilterOpen && ( {isRegionFilterOpen && (
<> <>
<div className="fixed inset-0 z-40" /> <div className="fixed inset-0 z-40" onClick={() => setIsRegionFilterOpen(false)} />
<motion.div <motion.div
initial={{ opacity: 0, y: 10, scale: 0.95 }} initial={{ opacity: 0, y: 10, scale: 0.95 }}
animate={{ opacity: 1, y: 0, scale: 1 }} animate={{ opacity: 1, y: 0, scale: 1 }}
@@ -2266,7 +2266,7 @@ export default function App() {
{isCustomerFilterOpen && ( {isCustomerFilterOpen && (
<> <>
{/* Backdrop */} {/* Backdrop */}
<div className="fixed inset-0 z-40" /> <div className="fixed inset-0 z-40" onClick={() => setIsCustomerFilterOpen(false)} />
{/* Popover Content */} {/* Popover Content */}
<motion.div <motion.div