mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 23:35:30 +08:00
Merge branch '2.x' into 3.x
This commit is contained in:
@@ -113,7 +113,7 @@
|
||||
x-model="displayText"
|
||||
@if ($id = $getId()) id="{{ $id }}" @endif
|
||||
@class([
|
||||
'w-full h-full p-0 placeholder-gray-400 bg-transparent border-0 outline-none focus:placeholder-gray-500 focus:ring-0 dark:bg-gray-700 dark:placeholder-gray-400',
|
||||
'w-full h-full p-0 placeholder-gray-400 bg-transparent border-0 outline-none focus:outline-none focus:placeholder-gray-500 focus:ring-0 dark:bg-gray-700 dark:placeholder-gray-400',
|
||||
'cursor-default' => $isDisabled,
|
||||
])
|
||||
/>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
namespace Filament\Tables\Columns\Concerns;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
trait CanBeSearchable
|
||||
{
|
||||
@@ -20,20 +22,20 @@ trait CanBeSearchable
|
||||
protected ?Closure $searchQuery = null;
|
||||
|
||||
/**
|
||||
* @param bool | array<string> $condition
|
||||
* @param bool | array<string> | string $condition
|
||||
*/
|
||||
public function searchable(
|
||||
bool | array $condition = true,
|
||||
bool | array | string $condition = true,
|
||||
?Closure $query = null,
|
||||
bool $isIndividual = false,
|
||||
bool $isGlobal = true,
|
||||
): static {
|
||||
if (is_array($condition)) {
|
||||
$this->isSearchable = true;
|
||||
$this->searchColumns = $condition;
|
||||
} else {
|
||||
if (is_bool($condition)) {
|
||||
$this->isSearchable = $condition;
|
||||
$this->searchColumns = null;
|
||||
} else {
|
||||
$this->isSearchable = true;
|
||||
$this->searchColumns = Arr::wrap($condition);
|
||||
}
|
||||
|
||||
$this->isGloballySearchable = $isGlobal;
|
||||
|
||||
Reference in New Issue
Block a user