-
Notifications
You must be signed in to change notification settings - Fork 399
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
"set" property editor doesn't support ajax request for getting choices #720
Comments
@xxxKOTxxx Sorry, I could not understand your task. Do you want to get the choices for a property from a service? Thank you, |
Yes, i need load tag entities list from backend and show them in new file widget property as multiselect. Currently I created custom editor using select2. But it will be much easier to use set with choicesCallback if You add it. |
@xxxKOTxxx Do you refer to the example that shows how to get countries from rest service? Thank you, |
Yep! But I can't use it because of null in choicesCallback |
@xxxKOTxxx When it happens? It works for me. Here is the example. Thank you, |
Yes, it works. But look here I just changed type to "set" (I need multiselect) and it not works any more. I log in console choicesCallback and it's null. That's I told about. |
@xxxKOTxxx Got it now. "set" is property editor type. I will take a look. Thank you, |
Thank you! One more question: have you any example, how to correct implement nonvalue custom widet like html widget? |
@xxxKOTxxx I added support for callback function for set property editor by the commit above. New unit test was added. The fix will come with v1.5.19 that we will release next week. Regarding your last question, please create a new issue that we can discuss in a new thread. Thank you, |
I added new issue. So i need to transform backend option data objects to strings in callback or there is more easiest way that I missed out? |
@xxxKOTxxx It can be a single value or a pair value/text. Here is the example for returned choices array: Thank you, |
Hello!
To begin with, I would like to thank you for creating an excellent library!
So it’s my turn to add tags to the question.
The most suitable in my situation, I consider the "set" property editor.
But I have two questions:
How can I get choises from the backend?
Unfortunately choicesCallback parameter is null instead of function in choises function callback.
It also doesn't support promises as I understand. So can you propose some other way?
My backend return objects because I need to support localizations, but as I can see it supports only string values? Any suggestions?
The text was updated successfully, but these errors were encountered: