npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

material-ui-selectfield

v1.0.24

Published

material-ui-selectfield React component

Downloads

29

Readme

material-ui-selectfield

Travis npm package

This repository was originally a fork of: https://github.com/Sharlaan/material-ui-superselectfield

Check it out and don't forget to star it ;)

Demo

https://maximilianpichler.github.io/material-ui-selectfield/

Installation

npm i -S material-ui-selectfield

Dependencies

  • react
  • material-ui
  • react-infinite

Properties

| Name | Type | Default | Description | |:---- |:---- |:---- |:---- | | name | string | | Required to differentiate between multiple instances of superSelectField in same page. | | floatingLabel | string or node | | The content to use for the floating label element. | | hintText | string | | Placeholder text for the main selections display. | | hintTextAutocomplete | string | 'Search' | Placeholder text for the autocomplete. | | errorText | string | | Include this property to show an error text. | | noMatchFound | string | 'No match found' | Placeholder text when the autocomplete filter fails. | | anchorOrigin | object | { vertical: 'top', horizontal: 'left' } | Anchor position of the menu, accepted values: top, bottom / left, right | | checkPosition | string | '' | Position of the checkboxes in multiple mode. Accepted values: '', left, right. If the default value is selected, the checkboxes are not shown | | canAutoPosition | bool | true | If present, this property allows the inner Popover component to position the menu in such way options are not hidden by the screen edges. | | multiple | bool | false | Include this property to turn superSelectField into a multi-selection dropdown. Checkboxes will appear.| | open | bool | false | Include this property to make the dropdown stay always open.| | disabled | bool | false | Include this property to disable superSelectField.| | value | null, object, object[] | null | Selected value(s)./!\ REQUIRED: each object must expose a 'value' property. | | onMenuOpen | function | () => {} | Triggers when the dropdown menu is opened | | onChange | function | () => {} | Triggers when selecting/unselecting an option from the Menu.signature: (selectedValues, name) with selectedValues array of selected values based on selected nodes' value property, and name the value of the superSelectField instance's name property | | onAutoCompleteTyping | function | () => {} | Exposes the word typed in AutoComplete. Useful for triggering onType API requests. | | children | any | [] | Datasource is an array of any type of nodes, styled at your convenience./!\ REQUIRED: each node must expose a value property. This value property will be used by default for both option's value and label.A label property can be provided to specify a different value than value. | | nb2show | number | 5 | Number of options displayed from the menu. | | elementHeight | number, number[] | 36 | Height in pixels of each option element. If elements have different heights, you can provide them in an array. | | showAutocompleteThreshold | number | 10 | Maximum number of options from which to display the autocomplete search field. For example, if autoComplete textfield need to be disabled, just set this prop with a value higher than children length. | | autocompleteFilter | function | see below | Provide your own filtering parser. Default: case insensitive.The search field will appear only if there are more than 10 children (see showAutocompleteThreshold).By default, the parser will check for label props, 'value' otherwise. | | useLayerForClickAway | bool | false | If true, the popover dropdown will render on top of an invisible layer, which will prevent clicks to the underlying elements, and trigger an onRequestClose('clickAway') call. |

Styling properties

| Name | Type | Default | Description | |:---- |:---- |:---- |:---- | | style | object | {} | Insert your own inlined styles, applied to the root component. | | menuStyle | object | {} | Styles applied to the comtainer which will receive your children components. | | menuGroupStyle | object | {} | Styles applied to the MenuItems hosting your <optgroup/>. | | innerDivStyle | object | {} | Styles applied to the inner div of MenuItems hosting each of your children components. | | menuFooterStyle | object | {} | Styles applied to the Menu's footer. | | menuCloseButton | node | | A button for an explicit closing of the menu. Useful on mobiles. | | selectedMenuItemStyle | object | {color: muiTheme.menuItem.selectedTextColor} | Styles to be applied to the selected MenuItem. | | selectionsRenderer | function | see below | Provide your own renderer for selected options. Defaults to concatenating children's values text. Check CodeExample4 for a more advanced renderer example. | | checkedIcon | SVGicon | see below | The SvgIcon to use for the checked state. This is useful to create icon toggles. | | unCheckedIcon | SVGicon | see below | The SvgIcon to use for the unchecked state. This is useful to create icon toggles. | | hoverColor | string | 'rgba(69, 90, 100, 0.1)' | Overrides the hover background color. | | floatingLabelStyle | object | | Allows to change the styles of the floating label. | | floatingLabelFocusStyle | object | | Allows to change the styles of the floating label when focused. | | underlineStyle | object | | Allows to change the styles of the underline. | | underlineFocusStyle | object | | Allows to change the styles of the underline when focused. | | autocompleteUnderlineStyle | object | | Allows to change the styles of the searchTextField's underline. | | autocompleteUnderlineFocusStyle | object | | Allows to change the styles of the searchTextField's underline when focused. |

Default functions

| Name | Default function | |:---- |:---- | | checkedIcon | <CheckedIcon style={{ top: 'calc(50% - 12px)' }} /> | | unCheckedIcon | <UnCheckedIcon style={{ top: 'calc(50% - 12px)' }} /> | | autocompleteFilter | (searchText, text) => !text || text.toLowerCase().includes(searchText.toLowerCase()) | | selectionsRenderer | |