jQWidgets Forums

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts

  • AsterionDB
    Participant

    OK…that ‘window.$’ thing tripped me up for a few days.

    Seems to me that the dataAdapter variable you have defined has gone out of scope (i.e. not defined within the scope of the promise). You may need to ‘bind(this)’ up.


    AsterionDB
    Participant

    Do it like this: let dataAdapter = new window.$.jqx.dataAdapter(source);

    For more info see this thread: create-react-app – jqx.dataAdapter


    AsterionDB
    Participant

    I first noticed the problem w/ JqxSwitchButton. I then changed my design to use JqxToggleButton. I even tried resetting the button text of a regular button (JqxButton) but nothing worked. I placed calls to val() and value(). Neither of these calls work.

    Please make your example program work.

    in reply to: Repopulate JqxComboBox Repopulate JqxComboBox #95688

    AsterionDB
    Participant

    Sorry, I will not have time to put together an example. Take a look at how they implement the master-detail capability in the jqxDataTable demonstration. The process is very similar.

    in reply to: Repopulate JqxComboBox Repopulate JqxComboBox #95659

    AsterionDB
    Participant

    You have to rebuild the jqxDataAdapter and then reset the source for the jqxComboBox. There’s a jqxComboBox method that allows you to set the source property. Call that function in your downstream code when you need to repopulate the jqxComboBox.


    AsterionDB
    Participant

    Nevermind…it is normal from what I can tell. If you want the actual numerical value you have to call jqxNumberInput.val().


    AsterionDB
    Participant

    Thanks…there must be something I’m doing then. My data acquisition logic is outside of the render() function.


    AsterionDB
    Participant

    Seems as though the problem may be related to loading in JSON Data. What is the recommended method for placing a data table upon a tab with dynamic data via a JSON call.


    AsterionDB
    Participant

    Peter,

    You need to update your documentation so that any reference to the global ‘$’ object is prefaced with ‘window.’ (or in the alternative, the line ‘const $ = window.$;’ is used). This applies for calls to both $.jqx.dataAdapter and $.fn.jquery (they should appear as ‘window.$.jqx.dataAdapter’ and ‘window.$.fn.jquery’) as detailed by the create-react-app readme.md file, which I quoted from above.

    As I stated, I wasted two days finding this bit of information.


    AsterionDB
    Participant

    The suggestions offered by ‘admin’ will not be of any help. I doubt they even tried to reproduce the problem w/ create-react-app.

    The obscure tidbit of information that you need is buried in the readme.md created by create-react-app.

    Don’t feel bad. I wasted a day finding this info.

    Note: I prefer being specific so the syntax I use is ‘… = new window.$.jqx.dataAdapter(…);’. Making that one change will produce a working demo.

    ## Using Global Variables

    When you include a script in the HTML file that defines global variables and try to use one of these variables in the code, the linter will complain because it cannot see the definition of the variable.

    You can avoid this by reading the global variable explicitly from the window object, for example:

    `js
    const $ = window.$;
    `

    This makes it obvious you are using a global variable intentionally rather than because of a typo.

    Alternatively, you can force the linter to ignore any line by adding // eslint-disable-line after it.


    AsterionDB
    Participant

    The obscure tidbit of information that you need is buried in the readme.md created by create-react-app.

    Don’t feel bad. I wasted a day finding this info.

    ## Using Global Variables

    When you include a script in the HTML file that defines global variables and try to use one of these variables in the code, the linter will complain because it cannot see the definition of the variable.

    You can avoid this by reading the global variable explicitly from the window object, for example:

    `js
    const $ = window.$;
    `

    This makes it obvious you are using a global variable intentionally rather than because of a typo.

    Alternatively, you can force the linter to ignore any line by adding // eslint-disable-line after it.

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