jQuery UI Widgets Forums Plugins AngularJS How to stop binding updates firing UI change events

This topic contains 4 replies, has 2 voices, and was last updated by  Euan 9 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author

  • Euan
    Participant

    I have an app that displays a number of sliders that are updated from the server with a %http.get and json. The sliders use this same object for the values. When a user moves the slider I want to post the new value back to the server. Above each slider I also have a numeric input box for precise value input. This uses the same data object value.

    I have a mess that when one is updated the other updates, and they all fire their update events even though it wasn’t a user interface change. Is there away to stop the events firing when the value is changed from the binding?


    Dimitar
    Participant

    Hello Euan,

    Generally speaking, widget events are fired both when changes are made manually and via the widgets’ API.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    Euan
    Participant

    OK,

    Is it then possible to make it such that when the slider is moved, and the change event is called to take the new value but then cancel the update. I can then do a post to the server of the caught value, which will then be fed back to the model via its periodic update?

    Something like a directive jx-noupdate. In effect a 1-way binding?

    Angular only seem to have a one time binding, no 1-way binding.


    Dimitar
    Participant

    Hi Euan,

    The features provided by the jqxAngular plug-in are specified in the jQWidgets Integration with AngularJS help topic, but, unfortunately, your requirement is not one of them. It may, however, be possible to achieve this with a more JavaScript/jQuery-oriented approach.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    Euan
    Participant

    Yes I guess I either need to make a new slider control, or modify the standard one if possible.

    I have made my own “checkbox” for 3-way updating and it works well in that case.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.