Skip to content

Commit 6a1190d

Browse files
authored
Merge branch '3.x' into fix-131
2 parents a5fc7ab + 68a38f8 commit 6a1190d

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
"dependencies": {
2222
"treeselectjs": "^0.13.0"
2323
}
24-
}
24+
}

resources/dist/filament-select-tree.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/SelectTree.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,7 @@ public function multiple(Closure|bool $multiple = true): static
301301

302302
public function prepend(Closure|array|null $prepend = null): static
303303
{
304-
$this->prepend = $this->evaluate($prepend);
305-
306-
if (is_array($this->prepend) && isset($this->prepend['name'], $this->prepend['value'])) {
307-
$this->prepend['value'] = (string) $this->prepend['value'];
308-
} else {
309-
throw new \InvalidArgumentException('The provided prepend value must be an array with "name" and "value" keys.');
310-
}
304+
$this->prepend = $prepend;
311305

312306
return $this;
313307
}
@@ -447,11 +441,9 @@ public function getIndependent(): bool
447441
return $this->evaluate($this->independent);
448442
}
449443

450-
public function getCustomKey($record): string
444+
public function getCustomKey($record)
451445
{
452-
$key = is_null($this->customKey) ? $record->getKey() : $record->{$this->customKey};
453-
454-
return (string) $key;
446+
return is_null($this->customKey) ? $record->getKey() : $record->{$this->customKey};
455447
}
456448

457449
public function getWithCount(): bool

0 commit comments

Comments
 (0)