Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-autowhatever

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-autowhatever - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

demo/src/components/App/components/Example3/Example3.js

@@ -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 @@ );

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc