Multi select selected issue #2475
somnath-dev-dapl
started this conversation in
General
Replies: 1 comment
-
Hi @somnath-dev-dapl please share the code you are using in the repository class. It seems like your |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In twill3 I created 2 CRUD, ImportedItem and ItemTypes. I used Multiselect for selecting ItemTypes.
$form->add(
MultiSelect::make()
->name('item_types_id')
->label('Item Type')
->inline()
->options(
Options::make(
ItemType::all()
->map(
fn($sector) => Option::make(
$sector->id,
$sector->title
)
)
->toArray()
)
)
);
This is the code. I also tried another code also
$form->add(
MultiSelect::make()
->inline()
->name('item_types_id')
->label('Item Type')
->searchable()
->options(
app()->make(ItemTypeRepository::class)->listAll()->toArray()
)
);
Here updated on pivot table. But after refresh its not selected.
How do I selected this in multiselect?
Beta Was this translation helpful? Give feedback.
All reactions