Fix the default value of search record if the filter is boolean type (#17297)

This fixes the #15896. For problem statement. Please refer to the shared
video mentioned in the issue.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Aligns filter defaults across UI by centralizing initial value
computation.
> 
> - Add boolean handling in `useGetInitialFilterValue` to return
`value/displayValue` of `'false'` when operand is `IS`
> - Update `WorkflowDropdownStepOutputItems` to use
`getInitialFilterValue` for initial `value` instead of an empty string,
based on field type and default operand
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3ce05fa31aec1c9e771cb1b3ff20ddea3fab304f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
Aman Raj
2026-01-25 03:57:05 +05:30
committed by GitHub
parent fa0615d41e
commit 62845cac87
2 changed files with 21 additions and 2 deletions
@@ -55,6 +55,13 @@ export const useGetInitialFilterValue = () => {
return { value: '', displayValue: '' };
}
break;
}
case 'BOOLEAN': {
if (newOperand === RecordFilterOperand.IS) {
return { value: 'false', displayValue: 'false' };
}
break;
}
}