jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox result of 'renderer' is being ignored

Tagged: 

This topic contains 3 replies, has 3 voices, and was last updated by  Peter Stoev 11 years, 12 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • result of 'renderer' is being ignored #24104

    stephan
    Participant

    Hi,

    I found that the result of the ‘renderer’ function is being ignored after the initial calls during ComboBox creation. Have a look at this fiddle:
    http://jsfiddle.net/fPzA7/6/

    The counter shows that ‘renderer’gets called for every letter that you type into the input field. Yet what renderer returns on those invocations is apparently being ignored by the ComboBox, otherwise the list entries shown in the ComboBox should also show increasing indexes.

    What I wanted to achieve is to modify the textual representation of the matches in the list based upon what was being types in the text input field. More precisely: I wanted to show the actual textl matches within the list in bold. So by experimentation I found out that ‘renderer’ gets called whenever I type in the text input field. Yet apparently no matter what I return from renderer the list entries do not update.

    Regards,
    Stephan

    result of 'renderer' is being ignored #24105

    admin
    Keymaster

    Hi,

    That is a normal behavior. The rendered items are being cached. The renderer is called when an item should be rendered for first time or the widget’s data source is changed.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    result of 'renderer' is being ignored #24106

    stephan
    Participant

    Hi admin,

    What you say makes sense as a general concept … but why is renderer being called repeatedly, ie. at each char input, but with the return value being ignored ? That is inconsistent with what you have explained. Also: ‘renderer’ gets called 3 times for each list item when the ComboBox gets created. This makes me wonder which of the 3 invocation return value is the one that actually gets used and shows up in the list ?

    QUESTION:
    Does jqxComboBox support in any way a ‘content changed’ event for the text input field ?

    I could not find anything along these lines in the documentation. I am thinking of actually updating the list entries (using ‘updateItem’ API function) each time the user enters something into the text input field …

    Regards,
    Stephan

    result of 'renderer' is being ignored #24110

    Peter Stoev
    Keymaster

    Hi,

    – The method is called when an item is measured and when an item is going to be displayed.
    – There is no event when the text is changed.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.