jQWidgets Forums

jQuery UI Widgets Forums React Bug in jqxInput calling change and select events

This topic contains 1 reply, has 1 voice, and was last updated by  assembler 7 years, 7 months ago.

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

  • assembler
    Participant

    Hi everybody,

    I’ve found a possible bug in the jqxinput component. I’m calling this:

    componentDidMount() {
       this.input.on('change', (event) => {
           console.log('change here...');
       });
    
       this.input.on('select', (event) => {
           console.log('select here...');
       });
    }
    
    inputRefBuilder = (ref) => {
       this.input = ref;
    }
    
    render () {
      ...
      return ( <div>
         <JqxInput ref={this.inputRefBuilder} width={250} height={23} minLength={1} placeHolder={'Hey...'}/>}
      </div>);
      ...
    }

    Those events don’t work as expected for me. They do nothing at all, except if I loose the focus on the JqxInput, then it’ll trigger the change event printing for console the message twice. So, the only variation I made here from the example is the ref, I’m using a ref builder function as recommended for the React official documentation. My question is: am I correct and this is a bug, or what am I missing here?

    My best regards


    assembler
    Participant

    Well I guess I found a solution, since this library is based on jQuery I did a little research in jQuery and then I changed the event change for the input event (which comes from jQuery) and it worked. Sorry, I needed a little bit more of research before asking.

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

You must be logged in to reply to this topic.