New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@clayui/multi-select

Package Overview
Dependencies
Maintainers
3
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clayui/multi-select - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

14

CHANGELOG.md

@@ -6,2 +6,16 @@ # Change Log

# [3.2.0](https://github.com/liferay/clay/tree/master/packages/clay-multi-select/compare/@clayui/multi-select@3.1.0...@clayui/multi-select@3.2.0) (2019-12-05)
### Bug Fixes
- **drop-down:** use dom-align instead of metal-position ([335ff38](https://github.com/liferay/clay/tree/master/packages/clay-multi-select/commit/335ff38))
- check if input is empty rather than checking source items ([bd4adc6](https://github.com/liferay/clay/tree/master/packages/clay-multi-select/commit/bd4adc6))
- prevent backspace from navigating backwards ([69f6c8d](https://github.com/liferay/clay/tree/master/packages/clay-multi-select/commit/69f6c8d)), closes [#1448](https://github.com/liferay/clay/tree/master/packages/clay-multi-select/issues/1448)
### Features
- **@clayui/multi-select:** adding stories ([470897a](https://github.com/liferay/clay/tree/master/packages/clay-multi-select/commit/470897a))
- **@clayui/multi-select:** adding tests ([2185a80](https://github.com/liferay/clay/tree/master/packages/clay-multi-select/commit/2185a80))
- **@clayui/multi-select:** extracting the filter function to a prop ([f941c74](https://github.com/liferay/clay/tree/master/packages/clay-multi-select/commit/f941c74))
# [3.1.0](https://github.com/liferay/clay/tree/master/packages/clay-multi-select/compare/@clayui/multi-select@3.0.2...@clayui/multi-select@3.1.0) (2019-11-07)

@@ -8,0 +22,0 @@

2

lib/index.d.ts

@@ -12,2 +12,3 @@ import React from 'react';

interface IMenuRendererProps {
filter?: (item: Item, inputValue: string, locator: Locator) => boolean;
inputValue: string;

@@ -25,2 +26,3 @@ locator: Locator;

disabledClearAll?: boolean;
filter?: (item: Item, inputValue: string, locator: Locator) => boolean;
inputName?: string;

@@ -27,0 +29,0 @@ inputValue: string;

@@ -57,4 +57,10 @@ "use strict";

var defaultFilter = function defaultFilter(item, inputValue, locator) {
return inputValue && item[locator.label].match(inputValue);
};
var MultiSelectMenuRenderer = function MultiSelectMenuRenderer(_ref) {
var inputValue = _ref.inputValue,
var _ref$filter = _ref.filter,
filter = _ref$filter === void 0 ? defaultFilter : _ref$filter,
inputValue = _ref.inputValue,
locator = _ref.locator,

@@ -65,3 +71,3 @@ _ref$onItemClick = _ref.onItemClick,

return _react.default.createElement(_dropDown.default.ItemList, null, sourceItems.filter(function (item) {
return inputValue && item[locator.label].match(inputValue);
return filter(item, inputValue, locator);
}).map(function (item) {

@@ -86,2 +92,4 @@ return _react.default.createElement(_autocomplete.default.Item, {

disabledClearAll = _ref2.disabledClearAll,
_ref2$filter = _ref2.filter,
filter = _ref2$filter === void 0 ? defaultFilter : _ref2$filter,
inputName = _ref2.inputName,

@@ -122,3 +130,3 @@ _ref2$inputValue = _ref2.inputValue,

spritemap = _ref2.spritemap,
otherProps = _objectWithoutProperties(_ref2, ["clearAllTitle", "closeButtonAriaLabel", "disabled", "disabledClearAll", "inputName", "inputValue", "isValid", "items", "locator", "menuRenderer", "onBlur", "onClearAllButtonClick", "onChange", "onFocus", "onItemsChange", "onKeyDown", "onPaste", "sourceItems", "spritemap"]);
otherProps = _objectWithoutProperties(_ref2, ["clearAllTitle", "closeButtonAriaLabel", "disabled", "disabledClearAll", "filter", "inputName", "inputValue", "isValid", "items", "locator", "menuRenderer", "onBlur", "onClearAllButtonClick", "onChange", "onFocus", "onItemsChange", "onKeyDown", "onPaste", "sourceItems", "spritemap"]);

@@ -142,3 +150,3 @@ var defaultRef = (0, _react.useRef)(null);

var matchedItems = sourceItems.filter(function (item) {
return inputValue && item[locator.label].match(inputValue);
return filter(item, inputValue, locator);
});

@@ -171,2 +179,6 @@ setActive(matchedItems.length !== 0);

if (keyCode === BACKSPACE_KEY && !inputValue) {
event.preventDefault();
}
if (inputValue && DELIMITER_KEYS.includes(keyCode)) {

@@ -287,2 +299,3 @@ event.preventDefault();

}, _react.default.createElement(MenuRenderer, {
filter: filter,
inputValue: inputValue,

@@ -289,0 +302,0 @@ locator: locator,

14

package.json
{
"name": "@clayui/multi-select",
"version": "3.1.0",
"version": "3.2.0",
"description": "ClayMultiSelect component",

@@ -29,12 +29,12 @@ "license": "BSD-3-Clause",

"dependencies": {
"@clayui/autocomplete": "^3.0.3",
"@clayui/drop-down": "^3.1.1",
"@clayui/form": "^3.2.0",
"@clayui/autocomplete": "^3.0.4",
"@clayui/drop-down": "^3.1.2",
"@clayui/form": "^3.2.1",
"@clayui/icon": "^3.0.1",
"@clayui/label": "^3.0.1",
"@clayui/shared": "^3.0.4",
"@clayui/shared": "^3.0.5",
"classnames": "^2.2.6"
},
"devDependencies": {
"@clayui/button": "^3.0.2"
"@clayui/button": "^3.0.3"
},

@@ -49,3 +49,3 @@ "peerDependencies": {

],
"gitHead": "e8d8027c66c6f9998b56f5bb7a0085bf00259a59"
"gitHead": "df13196d448cb28438003716c4bae275b793dec1"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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