jQWidgets Forums

jQuery UI Widgets Forums React Using jqwidget latest with React with pure js files

This topic contains 15 replies, has 2 voices, and was last updated by  vish05091980 5 years, 2 months ago.

Viewing 16 post (of 16 total)
  • Author

  • vish05091980
    Participant

    I saw the above example. Thanks for pointing that out. One question, above you mentioned:
    “The reason is that, you are trying to use them, before they are in the DOM.” So “them” and “they” you referring to is the JqxComboBox and JqxDateTimeInput right? If so. Can i instantiate JqxComboBox or JqxDateTime in my custom components constructor and then use it’s reference in the render method. Do you think it should work?

    e.g. Taking same example from my previous post:
    myCustomComboBox.js file:
    —————————————————-
    import React from ‘react’;

    import ‘jqwidgets-scripts/jqwidgets/styles/jqx.base.css’;
    import JqxComboBox from ‘jqwidgets-scripts/jqwidgets-react-tsx/jqxcombobox’;

    class MyCustomComboBox extends React.Component {
    constructor(props) {
    super(props);
    this.jqxComboBox = <JqxComboBox width={250} height={25} source={comboBoxSource} displayMember=’displayMember’ valueMember=’valueMember’ />; ===> instantiating here
    }

    render() {
    return(
    <div>
    {this.jqxComboBox} ==> using the reference from the one instantiated in constructor.
    </div>
    );
    }
    }
    export default MyCustomComboBox ;

    Thanks in advance
    Vish

Viewing 16 post (of 16 total)

You must be logged in to reply to this topic.