Skip to content

Commit d47a2d8

Browse files
author
phoenix
committed
add -- option withFlatten
1 parent e0d6ccc commit d47a2d8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ Here are a few customization options
6161
- `->withPlaceholder(string $placeholder)` // - placeholder in tree select
6262
- `->withMaxHeight(int $maxHeight)`
6363
- `->withSortValueBy(string $sortBy)` // - @see https://vue-treeselect.js.org/#flat-mode-and-sort-values
64-
- `->withAlwaysOpen(boot $alwaysOpen)` // - by default select is open, but you can change it behavior
64+
- `->withAlwaysOpen(bool $alwaysOpen)` // - by default select is open, but you can change it behavior
65+
- `->withFlatten(bool $flatten)` // - by default flatten is enabled, but you can change it behavior
6566
- `->useSingleSelect()` // - ability for select only one value
6667

6768

src/NestedTreeAttachManyField.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,15 @@ public function withSortValueBy(string $sortBy): NestedTreeAttachManyField
163163
return $this;
164164
}
165165

166+
public function withFlatten(bool $flatten): NestedTreeAttachManyField
167+
{
168+
$this->withMeta([
169+
'flatten' => $flatten,
170+
]);
171+
172+
return $this;
173+
}
174+
166175
public function useSingleSelect(): NestedTreeAttachManyField
167176
{
168177
$this->withMeta([

0 commit comments

Comments
 (0)