Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes issue with "remove on backspace" (#14)
With onKeyUp, the last item gets removed one character too early – it gets removed when there's still one character left in inputValue. This is happening because the last remaining character gets removed during the onKeyDown event, so by the time it gets to the onKeyUp event inputValue is empty, so the item gets removed. But if you check inputValue during the onKeyDown event instead, the last item gets removed at the appropriate time.
- Loading branch information