Closed 0528Makoto closed 10 months ago
The SelectTree
is not a select field so you cant really do this.
How could I obtain the "name" of the selected option or options?
Right now, it's not officially supported, but you could try something like this:
->afterStateUpdated(function (string $operation, SelectTree $component, $state) {
// If it's a single select: Category::find($state);
// For multi-select: Category::whereIn('id', $state)->get();
}),
I'll check if we can make this officially supported down the road
How to use afterStateUpdated in SelectTree?
in Select
but this method "getOptionLabel" no exist in SelectTree