Open Radwisatso opened 2 years ago
@sickdyd
It doesn't seem to be ready for a header. The class names are auto-generated, so it makes it a bit tricky to hack it with CSS too. Relevant code:
<div className="wrapper">
<SearchInput
searchString={searchString}
setSearchString={handleSetSearchString}
autoFocus={autoFocus}
onBlur={() => setResults([])}
onFocus={onFocus}
onClear={onClear}
placeholder={placeholder}
showIcon={showIcon}
showClear={showClear}
setHighlightedItem={handleSetHighligthedItem}
/>
<Results
results={results}
onClick={handleOnClick}
setSearchString={setSearchString}
showIcon={showIcon}
maxResults={maxResul
resultStringKeyName={resultStringKeyName}
formatResult={formatResult}
highlightedItem={highlightedItem}
setHighlightedItem={handleSetHighligthedItem}
/>
</div>
</StyledReactSearchAutocomplete>
One hack that I think might work after all - place the search component inside a div with a special class name, e.g. myclassname, then use CSS to edit the elements with the 'line' class that are descendants of myclassname
Hi dev, I'm still trying to figure out how to make a custom formatResult with your library. I've attached the example below. Please let me know if it's possible to do
Thanks!
This is the only thing that I can do right now (pardon me for the bad quality)![3Fm12mQcoE](https://user-images.githubusercontent.com/85424069/165877589-327e8a9e-0a55-4db5-b0c0-6a4c36dbaea2.png)