Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Give options to replace input with any other element #393

Open
mnksingh1996 opened this issue May 14, 2019 · 0 comments
Open

Give options to replace input with any other element #393

mnksingh1996 opened this issue May 14, 2019 · 0 comments

Comments

@mnksingh1996
Copy link

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/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant