-
-
Notifications
You must be signed in to change notification settings - Fork 81
Closed
Description
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:
output?: (
item: Object | string,
trigger?: string
) =>
| {|
key?: ?string,
text: string,
caretPosition: "start" | "end" | "next" | number
|}
| string,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:
react-textarea-autocomplete/src/List.jsx
Line 58 in 7bd61f9
| return item.key; |
Metadata
Metadata
Assignees
Labels
No labels