-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SelectModel plugin async data loading #298
Comments
How would such an implementation look like? |
this is a work in progress This works pretty well so far..
and from calling side :
|
Had to call a
|
I have not deeply checked your code, but the most important is that the angular plugin can watch the value of a certain field, and if this value changes it needs to send an xhr request with the value. So now the problem is: who is communicating with the plugin? there is no controller or something like this, maybe we need a new action in the ngrest base api. Another solution would to provide all informations and just filter them out. |
An async option to load makes sense, maybe it it should add another plugin which just opening an url which must be configured: selectAsyncList('apth/to/api') |
https://demos.krajee.com/widget-details/depdrop @nadar |
@rochdi80tn could show u completely solution on this feture?? |
hey @flashjay - I totally understand the need and request for such a plugin which @rochdi80tn mentioned. I am going to prioritize this issue higher now. I think we can achieve this but going step by step:
|
This code work for me. but, ..
Js
|
Hey @rochdi80tn and @flashjay i have created a new plugin which can make requests to an api and return a result, it also can interact with the attributes around (for example, whenever an other attribute changes the value can be passed as argument to an api). Please take a look at #612 and https://github.com/luyadev/luya-module-admin/blob/master/src/ngrest/plugins/SelectAsyncApi.php |
The current implementation of SelectModel allows early loading of the dropdown options. What might be a useful feature is to be able to do asynchronous data loading of items using API calls both initially after the select is being rendered and later when user do search an entry in the list.
Goals and benefits
Many benefits we will gain :
Open for discussion
The text was updated successfully, but these errors were encountered: