choc-autocomplete
choc-autocomplete copied to clipboard
The `value` prop does nothing
In the docs, the prop value
in the AutoComplete
component says that this prop is:
value of the component in the controlled state
However, from testing this out and looking in the source code, it looks like the value
property is only used in example code, or types.ts
, or the values
property:
and the
values
property is only used in types.ts
:
Indicating that the AutoComplete
value
property does nothing.
However, from looking around the codebase, it looks like if you pass in value
to AutoCompleteInput
, this will make sure you can use AutoComplete
as a controlled component see:
https://github.com/anubra266/choc-autocomplete/blob/main/src/autocomplete-input.tsx#L62-L68
If this is true, it would be great if the documentation was updated to reflect this