fix: Make MCP bulk-manage select-all checkbox reflect selection state (#17174)

This commit is contained in:
euvre
2026-07-22 17:06:36 +08:00
committed by GitHub
parent 073fa123b3
commit 53d0613bb2

View File

@@ -107,7 +107,18 @@ export default function McpServer() {
<>
{isSelectionMode && (
<section className="pb-5 flex items-center">
<Checkbox id="all" onCheckedChange={handleSelectAll} />
<Checkbox
id="all"
checked={
selectedList.length > 0 &&
selectedList.length === data.mcp_servers.length
? true
: selectedList.length > 0
? 'indeterminate'
: false
}
onCheckedChange={handleSelectAll}
/>
<Label
className="pl-2 text-text-primary cursor-pointer"
htmlFor="all"