luvi-ui / laravel-luvi

UI components for Laravel you can copy and paste into your app. shadcn-ui like. Built with Blade and AlpineJS. Usable with Livewire.
https://laravel-luvi.com
MIT License
227 stars 11 forks source link

[Feature]: Can you add Async Select Field ? #4

Open Uhasith opened 3 months ago

Uhasith commented 3 months ago

What happened?

From that, we can define a route and get select options from an endpoint. Basically user can type and Search the record. This is useful when dealing with Large sets of data.

How to reproduce the bug

From that, we can define a route and get select options from an endpoint. Basically user can type and Search the record. This is useful when dealing with Large sets of data.

Package Version

2.0.0

PHP Version

8.2

Laravel Version

11.0.0

Which operating systems does this happen with?

macOS

Notes

No response

thoresuenert commented 2 months ago

What you're describing is the shadcn/ui combobox. We elaborate which solution we will offer right now. We use luvi-ui in a livewire project at the moment. We will add a showcase how to solve that problem with livewire.

Uhasith commented 2 months ago

What you're describing is the shadcn/ui combobox. We elaborate which solution we will offer right now. We use luvi-ui in a livewire project at the moment. We will add a showcase how to solve that problem with livewire.

Yeah, correct. In wireui they have this kind of thing https://wireui.dev/components/select#async-search. You can define a Laravel get route and define a logic there as you want. This is handy thing to have.

Uhasith commented 2 months ago

When can we have the Combo Box Feature ? @thoresuenert

thoresuenert commented 2 months ago

@Uhasith we have an example ready, need to polish some things tomorrow. hopefully we will release it tomorrow.

thoresuenert commented 2 months ago

@Uhasith we cooked something for you https://laravel-luvi.com/docs/livewire-components/combobox hopefully that is the answer to your question.

Otherwise feel free to elaborate more about your needs or implement it yourself. Happy to see pull requests.

Uhasith commented 1 month ago

@Uhasith we cooked something for you https://laravel-luvi.com/docs/livewire-components/combobox hopefully that is the answer to your question.

Otherwise feel free to elaborate more about your needs or implement it yourself. Happy to see pull requests.

Yeah it's looks awesome. But i guess it should be awesome to declare some backend route for handle the search query. From that kind of approach we will have more flexibility to perform the Search. For example when we dealing with Large amount of data set. We can set Limits. Pass some parameters and Narrow down our search Async Way. For update forms we can pass selected ids so they will come at the Top when search route is called. Really Really Happy about the effort Guys. But this can be optimized. Refer Some Docs in wireui Documentation. ❤️🚀🚀 @thoresuenert

Uhasith commented 1 month ago

What you're describing is the shadcn/ui combobox. We elaborate which solution we will offer right now. We use luvi-ui in a livewire project at the moment. We will add a showcase how to solve that problem with livewire.

Yeah, correct. In wireui they have this kind of thing https://wireui.dev/components/select#async-search. You can define a Laravel get route and define a logic there as you want. This is handy thing to have.

@thoresuenert Check these Mate. You can get a clear idea. Only thing i miss in Luvi Ui at the moment is this kind of Fully featured ComboBox 😃

thoresuenert commented 1 month ago

We are open to PRs. Feel free to do it as you need.