Skip to content

Commit e515f15

Browse files
committed
Edit Readme
1 parent 42618a3 commit e515f15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,12 @@ Now you can access the results in `disabledOptions` or `hiddenOptions`
170170
})
171171
```
172172

173-
By default, multiple or single selection in the tree is determined by the type of the relationship. Single for `BelongsTo` multiple for `BelongsToMany`. If you want explicitly set the type of selection use:
173+
By default, the type of selection in the tree (single or multiple) is determined by the relationship type: `BelongsTo` for single selection and `BelongsToMany` for multiple selection. If you want to explicitly set the selection type, use:
174174

175175
```PHP
176176
->multiple(false) //or true, Closure that returns boolean
177177
```
178-
179-
If you need to prepend an item to the tree menu use `prepend`. Method accept an array or closure. Useful when tree-select is used as a filter (see example below).
178+
If you need to prepend an item to the tree menu, use the `prepend` method. This method accepts an array or a closure. It is useful when the tree-select is used as a filter (see example below).
180179

181180
```php
182181
use Filament\Tables\Filters\Filter;
@@ -190,6 +189,7 @@ use CodeWithDennis\FilamentSelectTree\SelectTree;
190189
->form([
191190
SelectTree::make('category')
192191
->relationship('categories', 'name', 'parent_id')
192+
->enableBranchNode()
193193
->multiple(false)
194194
->prepend([
195195
'name'=>'Uncategorized Products', //required

0 commit comments

Comments
 (0)