This is a migrated thread and some comments may be shown as answers.

Property Editor textChanged event in angular

7 Answers 135 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nick
Top achievements
Rank 1
Nick asked on 11 Jul 2017, 04:51 AM

Is there an event I can subscribe to on the tkPropertyEditor to know when the value in the editor has changed, or when a value has been selected from the inlineautocomplete picker? I haven't found anything in the documentation about what events are available for the propertyeditors.

Here's what I'm trying to do: using the inlineautocomplete editor, I'd like to update the valuesprovider list whenever the text within the editor changes, then respond to the selection whenever the user picks an item from the picker.

7 Answers, 1 is accepted

Sort by
0
Nikolay Tsonev
Telerik team
answered on 11 Jul 2017, 06:02 AM
Hi Nick,
thank you for contacting us.

I reviewed your case and if I understand you correctly you are using DataForm component with Editor type "AutoCompleteInline" and you are looking for an event, which will be fired when a new item is picked from the available options.

In this you could use propertyCommittedEvent, which will notify you when the value of the editor is changed. For further info, you could review the documentation here or this example.

Hope this information helps

Regards,
nikolay.tsonev
Progress Telerik
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
0
Nick
Top achievements
Rank 1
answered on 11 Jul 2017, 06:21 AM

Thanks for the response. I did see that event, but it doesn't seem to be quite what I'm looking for. I'm looking for an event that fires when the editor's text is changed, and not necessarily when the property is committed to the bound [source] object. Something like (changed) or (textChange) perhaps?

This would let me update the AutoCompleteInline's valuesprovider based on the current text in the control, even if the dataForm's commit-mode is set to manual or OnLostFocus. The end result here is that I could modify the autocomplete suggestion list dynamically as the user types based on the current text they have entered.

0
Accepted
Nikolay Tsonev
Telerik team
answered on 11 Jul 2017, 10:53 AM
Hi,

Indeed it is not currently possible to handle text change for the DataForm fields.

Regarding that, it would help if you could provide some more info about your specific case, the need of handling text change and what is the expected final result.
This will help us to understand your scenario and we may consider exposing such event for future releases.

Bear in mind that at this moment the Editor if type  AutoCompleteInline, will filter the suggestions based on the current input

Best Regards,
nikolay.tsonev
Progress Telerik
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
0
Nick
Top achievements
Rank 1
answered on 12 Jul 2017, 08:16 PM

Okay thanks, that's good to know; I'll stop trying to figure it out.

As for my specific case, I have a component I built that updates a list of suggestions (addresses, in this case) when the user types into a textfield. Since the suggestions come from a web service based on the currently entered text, I can't populate the suggestion source (valuesprovider) statically. So it would be nice to edit the source object using the telerik DataForm, but until there's a mechanism to react to editor text changes, I'll need to use my current solution.

0
Nikolay Tsonev
Telerik team
answered on 13 Jul 2017, 05:28 AM
Hello Nick,

In your specific scenario, I could suggest downloading all the needed information from the web service and while binding valuesProvider property. This will allow you to setup all suggestion runtime from code behind after the data has been download from the DB. Something more for this case you could add all addresses, which will be filtered regarding the input.

A Very similar example could be found here, for the DataForm field named "from".

Let me know, whether this is applicable for you.


Regards,
nikolay.tsonev
Progress Telerik
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
0
Nick
Top achievements
Rank 1
answered on 13 Jul 2017, 07:36 PM
That solution won't work in this case, I'm afraid. The suggestions are obtained via a query to Google's Places API. So the suggestion pool is essentially "all" addresses. The only limiting factor on that set is the current text input.
0
Nikolay Tsonev
Telerik team
answered on 14 Jul 2017, 07:58 AM
Hi Nick,

Indeed this downloading all available addresses from Google Place API will not be an appropriate solution.

Regarding that, I have logged new feature request about implementing functionality, which allows handling text changing. You could keep track on it for further info.

Best Regards,
nikolay.tsonev
Progress Telerik
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Tags
DataForm
Asked by
Nick
Top achievements
Rank 1
Answers by
Nikolay Tsonev
Telerik team
Nick
Top achievements
Rank 1
Share this question
or