react-autocomplete-input icon indicating copy to clipboard operation
react-autocomplete-input copied to clipboard

onChange and onRequestOptions props do not work together

Open rishu605 opened this issue 10 months ago • 1 comments

I'm using the component with both onRequestOptions and onChange props. Both of these props work as intended when I pass only one of them. But when I use onChange and onRequestOptions props together, onChange fires but onRequestOptions does NOT fire up.

Not sure what is causing this to happen since it works perfectly when only one of these props is passed.

My use case is that whenever the user enters a "$" sign, I call handleRuleExpressionChange function to do something. And otherwise onRequestOptions should trigger whenever the user enters something that is passed into the trigger prop array

Code below: <TextInput onRequestOptions={() => { console.log("Inside onRequestOptions: ") }} onChange={handleRuleExpressionChange} value={ruleExpression} style={{width: "100%" }} trigger={trig} options={myObj} />

rishu605 avatar Sep 13 '23 11:09 rishu605

Hi, I am not actively maintaining the library but I am reviewing and merging PRs from time to time.

yury-dymov avatar Sep 29 '23 20:09 yury-dymov