Skip to content

Commit 7fa0341

Browse files
committed
fix checkbox with indeterminate
1 parent c6258bc commit 7fa0341

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

frontend/src/utils/formGeneration.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ export default function DynamicForm<Form extends object, IgnoredFormKeys extends
322322
<DynamicFormProvider value={{ formName, options, schemaFields: _schemaFields }}>
323323
<>
324324
<FormData />
325+
{/* TODO: if not visible (large forms), should show a popup arrow on viewport bottom left "Go to errors" to focus on callout */}
325326
<DynamicFormErrorCallout />
326327
<form
327328
onSubmit={(e) => {

frontend/src/utils/mantine-react-table.components.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,16 +404,14 @@ export const MRTCheckboxInput = forwardRef(function MRTCheckboxInput(
404404
const filterMode = dynamicConfig?.filterModes[column.id]
405405
const value = column.getFilterValue()
406406

407-
// FIXME: on checked=false change not rerendered, only on indeterminate
408407
return (
409408
<Checkbox
410409
{...props}
411410
data-testid={`input-filter--${column.id}`}
412411
ref={ref as any}
413412
checked={value === 'true'}
414413
data-checked={value === 'true'}
415-
indeterminate={value === undefined}
416-
data-indeterminate={value === undefined}
414+
{...(value === undefined && { indeterminate: true, 'data-indeterminate': true })}
417415
size="xs"
418416
onChange={(event) => {
419417
const newValue =

0 commit comments

Comments
 (0)