react-autowhatever
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -76,3 +76,3 @@ import theme from '../theme.less'; | ||
<Autowhatever id={exampleId} | ||
isMultiSection={true} | ||
multiSection={true} | ||
items={items} | ||
@@ -79,0 +79,0 @@ shouldRenderSection={shouldRenderSection} |
@@ -76,3 +76,3 @@ import theme from '../theme.less'; | ||
<Autowhatever id={exampleId} | ||
isMultiSection={true} | ||
multiSection={true} | ||
items={items} | ||
@@ -79,0 +79,0 @@ shouldRenderSection={shouldRenderSection} |
{ | ||
"name": "react-autowhatever", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Accessible rendering layer for Autosuggest and Autocomplete components", | ||
@@ -5,0 +5,0 @@ "main": "dist/Autowhatever.js", |
[![Build Status][status-image]][status-url] | ||
<a href="http://moroshko.github.io/react-autowhatever" target="_blank">Live Examples</a> | ||
<a href="http://react-autowhatever.js.org" target="_blank">Live Examples</a> | ||
@@ -5,0 +5,0 @@ **TODO:** |
@@ -7,3 +7,3 @@ import React, { Component, PropTypes } from 'react'; | ||
id: PropTypes.string, // Used in aria-* attributes. If multiple Autowhatever's are rendered on a page, they must have unique ids. | ||
isMultiSection: PropTypes.bool, // Indicates whether a multi section list of items should be rendered. | ||
multiSection: PropTypes.bool, // Indicates whether a multi section layout should be rendered. | ||
items: PropTypes.array.isRequired, // Array of items or sections to render. | ||
@@ -22,3 +22,3 @@ renderItem: PropTypes.func, // This function renders a single item. | ||
id: '1', | ||
isMultiSection: false, | ||
multiSection: false, | ||
shouldRenderSection: () => true, | ||
@@ -123,3 +123,3 @@ renderItem: () => { | ||
render() { | ||
const { id, isMultiSection, items, focusedSectionIndex, focusedItemIndex } = this.props; | ||
const { id, multiSection, items, focusedSectionIndex, focusedItemIndex } = this.props; | ||
const isOpen = (items.length > 0); | ||
@@ -144,4 +144,4 @@ const ariaActivedescendant = this.getItemId(focusedSectionIndex, focusedItemIndex); | ||
<input {...inputProps} /> | ||
{isOpen && isMultiSection && this.renderSections(theme)} | ||
{isOpen && !isMultiSection && this.renderItems(theme)} | ||
{isOpen && multiSection && this.renderSections(theme)} | ||
{isOpen && !multiSection && this.renderItems(theme)} | ||
</div> | ||
@@ -148,0 +148,0 @@ ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36840