laravel-splade icon indicating copy to clipboard operation
laravel-splade copied to clipboard

Table query-builder - filter by missing value

Open JapSeyz opened this issue 2 years ago • 0 comments

  • Laravel Version: 9.47.0
  • PHP Version: 8.1.14
  • Splade JS Version (npm): 1.1.7
  • Splade PHP Version (composer): 1.1.7

You may use the built-in Artisan Command to show the installed versions of the packages:

php artisan splade:show-versions

Description:

When providing a null option the table query-builder filter setup, it omits that value.

I'd like to be able to filter by rows missing a certain value. How can this be set up?

 $table->selectFilter(
            key: 'lat',
            options: [
                null => __('Missing'),
                '' => __('Also missing')
            ],
            label: __('GPS coordinates'),
            noFilterOption: true,
            noFilterOptionLabel: __('All')
        );
image

Steps To Reproduce Issue:

JapSeyz avatar Jan 22 '23 15:01 JapSeyz