choc-autocomplete icon indicating copy to clipboard operation
choc-autocomplete copied to clipboard

The `value` prop does nothing

Open ThomasHickman opened this issue 5 months ago • 0 comments

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: image and the values property is only used in types.ts: image

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

ThomasHickman avatar Jan 17 '24 16:01 ThomasHickman