filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.48k stars 2.98k forks source link

feat: 为`TernaryFilter`的`boolean`方法增加可选参数以支持数字过滤 #14518

Closed liushoukun closed 1 month ago

liushoukun commented 1 month ago

此更改扩展了TernaryFilter类的boolean方法,允许用户指定是否以数字形式(1和0)而非布尔值(true和false)进行查询过滤。通过新增参数 $isNumeric,可以在查询时根据其值选择使用数字或布尔值进行过滤,从而提高了查询的灵活性和兼容性。

Description

Visual changes

Functional changes

danharrin commented 1 month ago

Hi, I am not interested in supporting non-boolean boolean columns at the moment. You may override this using the queries() method on your own ternary filter though. Please check out our contributing guide which talks about proposing the feature before submitting the PR, to ensure you aren't spending time building something that we won't merge.