mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-11 04:56:56 +02:00
ui: let indeterminate state win over checked in group checkboxes
The checkbox indicator snippet renders the check icon whenever checked, so the mixed state never showed. Pass the checked prop as false while indeterminate. Assisted-by: pi
This commit is contained in:
+1
-1
@@ -281,7 +281,7 @@
|
||||
</span>
|
||||
|
||||
<Checkbox
|
||||
{checked}
|
||||
checked={checked && !indeterminate}
|
||||
class="{ICON_CLASS_DEFAULT} shrink-0"
|
||||
{indeterminate}
|
||||
onCheckedChange={() => toolsPanel.toggleGroupByKey(group.key)}
|
||||
|
||||
+2
-2
@@ -79,7 +79,7 @@
|
||||
{@const isExpanded = toolsPanel.expandedGroups.has(group.key)}
|
||||
{@const checked = toolsPanel.isGroupChecked(group)}
|
||||
{@const enabledCount = toolsPanel.getEnabledToolCount(group)}
|
||||
// parent on but nothing under it enabled, or partially enabled: show mixed state
|
||||
<!-- mixed state: parent on but nothing or only part of it enabled -->
|
||||
{@const indeterminate =
|
||||
group.tools.length > 0 && (enabledCount === 0 ? checked : enabledCount < group.tools.length)}
|
||||
{@const favicon = toolsPanel.getFavicon(group)}
|
||||
@@ -124,7 +124,7 @@
|
||||
{#snippet child({ props })}
|
||||
<Checkbox
|
||||
{...props}
|
||||
{checked}
|
||||
checked={checked && !indeterminate}
|
||||
class="mr-2 {ICON_CLASS_DEFAULT} shrink-0"
|
||||
{indeterminate}
|
||||
onCheckedChange={() => toolsPanel.toggleGroupByKey(group.key)}
|
||||
|
||||
Reference in New Issue
Block a user