Reputation: 727
I have onchange callback(been called from child to parent) function in one of the component i was trying to simulate onchange function as shown but i am getting error as 'getchangeChecbox' is not a function
childcomponent
<checkbox
label="checkbox input"
value={checkBoxInitalState}
onChange={e => { toggleCheckbox(e); selectOption(e?'A':'B') }}
testcase
checkBoxValue.props().onChange(false)
output.update()
Error
toggleCheckbox is not a function
how do i simulate onchange in this scenario?how to check selectoption value(selectoption is a function)
Upvotes: 0
Views: 55