This behavior should be configurable via a prop, something like showSuggestions: boolean.
When set to true, on focus of the input field, small number of recent posts should be shown as suggestions.
We could achieve similar results by setting minimum search length to 0, but that could cause unnecessary performance impact. The suggestions should only be fetched once the input field is focused.
For that reason, I'd make a separate prop for it.
This behavior should be configurable via a prop, something like
showSuggestions: boolean.When set to true, on focus of the input field, small number of recent posts should be shown as suggestions.
We could achieve similar results by setting minimum search length to 0, but that could cause unnecessary performance impact. The suggestions should only be fetched once the input field is focused.
For that reason, I'd make a separate prop for it.