chosen icon indicating copy to clipboard operation
chosen copied to clipboard

I am getting required result but i am getting and an exception in my console and which is i am given below

Open ahmadbjs opened this issue 3 years ago • 0 comments

Steps

  1.                       ` _react2.default.createElement(
       		'select',
       		{
       			name: 'account',
       			className: 'accountSelect chzn-select form-control',
       			defaultValue: this.state.account,
    
       			// onChange: this.onChangeAccount},
       			onChange:  $(".chzn-select").chosen().change(this.onChangeAccount)},
    
       		accountNodes
       	),`
    
  2.              ` onChangeAccount: function onChangeAccount(e) {
       $(".chzn-select").trigger(
       account = parseInt(e.target.value),
       this.setState({ account: account }),
       this.setState({ address: 0 }),
       this.loadAddressesFromServer(account),
       $(".chzn-select").chosen("destroy"),
    
       );
                },`
    

Expected behavior

I am getting my desired result on my site but i am also getting those errors which is given below

Actual behavior

jquery.min.js:4 Uncaught TypeError: p.indexOf is not a function at Object.trigger (jquery.min.js:4) at HTMLSelectElement. (jquery.min.js:4) at Function.each (jquery.min.js:2) at m.fn.init.each (jquery.min.js:2) at m.fn.init.trigger (jquery.min.js:4) at Object.onChangeAccount (m2admin-salesperson-edit.js:207) at HTMLSelectElement.dispatch (jquery.min.js:4) at HTMLSelectElement.r.handle (jquery.min.js:4) at Object.trigger (jquery.min.js:4) at HTMLSelectElement. (jquery.min.js:4)

Environment

  • chzn version 1.8.7:

  • **jQuery 3.5.1 **:

  • Google Chrome:

  • Window 10:

Additional information

Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, or potential solutions and workarounds.

ahmadbjs avatar Oct 13 '20 07:10 ahmadbjs