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

rc-cascader

Package Overview
Dependencies
Maintainers
5
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-cascader - npm Package Compare versions

Comparing version 3.2.8 to 3.2.9

15

es/OptionList/useKeyboard.js
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import * as React from 'react';
import { useBaseProps } from 'rc-select';
import KeyCode from "rc-util/es/KeyCode";
import { useBaseProps } from 'rc-select';
import { SEARCH_MARK } from '../hooks/useSearchOptions';
export default (function (ref, options, fieldNames, activeValueCells, setActiveValueCells, onKeyBoardSelect) {

@@ -172,3 +173,13 @@ var _useBaseProps = useBaseProps(),

if (validActiveValueCells.length) {
onKeyBoardSelect(validActiveValueCells, lastActiveOptions[lastActiveIndex]);
var option = lastActiveOptions[lastActiveIndex]; // Search option should revert back of origin options
var originOptions = (option === null || option === void 0 ? void 0 : option[SEARCH_MARK]) || [];
if (originOptions.length) {
onKeyBoardSelect(originOptions.map(function (opt) {
return opt[fieldNames.value];
}), originOptions[originOptions.length - 1]);
} else {
onKeyBoardSelect(validActiveValueCells, lastActiveOptions[lastActiveIndex]);
}
}

@@ -175,0 +186,0 @@

@@ -18,5 +18,7 @@ "use strict";

var _rcSelect = require("rc-select");
var _KeyCode = _interopRequireDefault(require("rc-util/lib/KeyCode"));
var _rcSelect = require("rc-select");
var _useSearchOptions = require("../hooks/useSearchOptions");

@@ -189,3 +191,13 @@ var _default = function _default(ref, options, fieldNames, activeValueCells, setActiveValueCells, onKeyBoardSelect) {

if (validActiveValueCells.length) {
onKeyBoardSelect(validActiveValueCells, lastActiveOptions[lastActiveIndex]);
var option = lastActiveOptions[lastActiveIndex]; // Search option should revert back of origin options
var originOptions = (option === null || option === void 0 ? void 0 : option[_useSearchOptions.SEARCH_MARK]) || [];
if (originOptions.length) {
onKeyBoardSelect(originOptions.map(function (opt) {
return opt[fieldNames.value];
}), originOptions[originOptions.length - 1]);
} else {
onKeyBoardSelect(validActiveValueCells, lastActiveOptions[lastActiveIndex]);
}
}

@@ -192,0 +204,0 @@

2

package.json
{
"name": "rc-cascader",
"version": "3.2.8",
"version": "3.2.9",
"description": "cascade select ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

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