Socket
Socket
Sign inDemoInstall

@comparaonline/ui-autocomplete-textfield

Package Overview
Dependencies
70
Maintainers
14
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @comparaonline/ui-autocomplete-textfield


Version published
Weekly downloads
33
Maintainers
14
Install size
3.73 MB
Created
Weekly downloads
 

Readme

Source

@comparaonline/ui-autocomplete-textfield

Installation

yarn add @comparaonline/ui-autocomplete-textfield

Usage


const items = [{
  label: "item1",
  value: 1
}, {
  label: "item2",
  value: 2
}];

<AutoCompleteTextField
  items={items}
  getItemLabel={item => item.label}
  getItemValue={item => item.value}
  textFieldProps={{
    fullWidth: true,
    label: 'Select car model',
    variant: 'outlined'
  }}
  suggestionProps={{
    noResultsText: 'No results',
    maxDisplayedItems: 10
  }}
/>

Component Props

nametyperequireddescription
itemsanytruelist of items to display
getItemLabelfunction: item => stringtruereceive an item an return its label
getItemValuefunction: item => stringtruereceive an item an return its value
suggestionPropsobjecttrueautocomplete configuration
textFieldPropsobjectfalseprops used by material-ui Textfield
searchOptionsobjectfalseconfiguration options used by fuse.js

suggestionProps

nametyperequireddefaultdescription
noResultsTextstringtruetext to display when there are not suggestions
maxDisplayedItemsnumberfalse5max number of suggestions to display

FAQs

Last updated on 21 Mar 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc