The doc about trigger option output does not match actual code.
The doc says that item must be unique. And the item unique id is received as result of calling function specified in trigger option output. This function must return object with optional field named key wich will be considered as item unique id. Doc declares a prototype:
But the code currently ignore field key from object returned by this function. Same time code
actually use field key of item itself instead of result of that function in the line:
The doc about trigger option
output
does not match actual code.The doc says that item must be unique. And the item unique id is received as result of calling function specified in trigger option
output
. This function must return object with optional field namedkey
wich will be considered as item unique id. Doc declares a prototype:But the code currently ignore field
key
from object returned by this function. Same time code actually use fieldkey
ofitem
itself instead of result of that function in the line:https://github.com/webscopeio/react-textarea-autocomplete/blob/7bd61f93c572cdf7af4f3de1409d8fc2fd1a5816/src/List.jsx#L58