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

Give options to replace input with any other element

Open mnksingh1996 opened this issue 6 years ago • 0 comments

Currently we have option to pass props to input element hidden inside the component. Please also give option to create a select box or lets just say text as well. Currently i am using the same autocomplete api for a creating a dropdown

<div className="dropdown-container" onMouseEnter={() => setCollapsed(false)} onMouseLeave={() => setCollapsed(true)} > <ShoppingCart /> Cart <Autocomplete getItemValue={getItemValue} items={items} inputProps={{ className: "dropdown" }} // wrapperStyle={{ position: "relative", display: "inline-block" }} renderItem={renderItem} renderMenu={renderMenu} value={selectedValue} onChange={onChange} onSelect={onSelect} // open={true} open={!collapsed} /> </div>

.dropdown-container { input { visibility: hidden; border: 0; width: 0; height: 0; padding: 0; } In the below website i have created the search with autocomplete but i am using similar snippet like above to create dropdown like cart/account dropdown from autocomplete module.

https://www.fnp.com/

mnksingh1996 avatar May 14 '19 07:05 mnksingh1996