Skip to content

inserting a new object into items #779

Discussion options

You must be logged in to vote

So I had to use a kludge via useRef. Adding the following line to the handleAddWater function did the trick.

waterTaRef.current.state.selected = [newWater];

I replaced the line that forces the typeahead to have focus since adding the new water accomplishes the typeahead's purpose. I can now increase the complexity of the water object.

thanks.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@flyfisher1952
Comment options

@ericgio
Comment options

Comment options

You must be logged in to vote
5 replies
@ericgio
Comment options

@flyfisher1952
Comment options

@flyfisher1952
Comment options

@flyfisher1952
Comment options

Answer selected by flyfisher1952
@ericgio
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants