mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
fix: make dynamic models select-all checkbox respect search filters
The "Select all" checkbox for dynamic models was using the unfiltered models list, causing the checkbox state to not reflect what users see when searching. Now it correctly operates on the filtered models list so: - Checkbox state matches the visible filtered models - "Select all" only toggles models the user can see - Indeterminate state shows if some filtered models are selected This ensures the checkbox has a meaningful purpose when filtering/searching models. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -611,16 +611,16 @@ export function OpencodeModelConfiguration({
|
||||
Dynamic
|
||||
</Badge>
|
||||
</div>
|
||||
{models.length > 0 && (
|
||||
{filteredModels.length > 0 && (
|
||||
<div className={OPENCODE_SELECT_ALL_CONTAINER_CLASS}>
|
||||
<Checkbox
|
||||
checked={getSelectionState(
|
||||
models.map((model) => model.id),
|
||||
filteredModels.map((model) => model.id),
|
||||
enabledDynamicModelIds
|
||||
)}
|
||||
onCheckedChange={(checked) =>
|
||||
toggleProviderDynamicModels(
|
||||
models.map((model) => model.id),
|
||||
filteredModels.map((model) => model.id),
|
||||
checked
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user