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

Give options to replace input with any other element #393

@mnksingh1996

Description

@mnksingh1996

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions