mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-26 04:32:50 +00:00
Fixed the issue where clicking on checkboxes in the MCP service modal would trigger double-click events, causing selections to be immediately deselected. Root cause: - Checkbox onChange events were conflicting with parent HStack onClick events - Both components were trying to handle the same selection logic Solution: - Extracted handleItemClick function to avoid code duplication - Flex onClick: only e.stopPropagation() to prevent event bubbling - Checkbox onChange: handleItemClick for checkbox-specific interactions - HStack onClick: handleItemClick for row-level interactions Benefits: ✅ Checkbox clicks work properly without double-toggle ✅ Full row click functionality preserved ✅ All checkbox hover/focus effects maintained ✅ Clean DRY code structure with shared logic ✅ Perfect visual alignment between checkbox and avatar Changes made to: - projects/app/src/pageComponents/dashboard/mcp/EditModal.tsx:159-194 🤖 Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Happy <yesreply@happy.engineering> |
||
|---|---|---|
| .. | ||
| data | ||
| public | ||
| src | ||
| test | ||
| .env.template | ||
| Dockerfile | ||
| next-i18next.config.js | ||
| next.config.js | ||
| package.json | ||
| tsconfig.json | ||