react-select-search
Advanced tools
Comparing version 3.0.7 to 3.0.8
@@ -42,7 +42,8 @@ "use strict"; | ||
if (!current || highlighted < 0 && Array.isArray(value) || value === null) { | ||
if (!current || highlighted < 0 && value === null) { | ||
return; | ||
} | ||
var query = highlighted > -1 ? "[data-index=\"" + highlighted + "\"]" : "[data-value=\"" + escape(value) + "\"]"; | ||
var val = Array.isArray(value) ? value[0] : value; | ||
var query = highlighted > -1 ? "[data-index=\"" + highlighted + "\"]" : "[data-value=\"" + escape(val) + "\"]"; | ||
var selected = current.querySelector(query); | ||
@@ -49,0 +50,0 @@ |
@@ -36,7 +36,8 @@ import { memo, useCallback, useEffect, useRef } from 'react'; | ||
if (!current || highlighted < 0 && Array.isArray(value) || value === null) { | ||
if (!current || highlighted < 0 && value === null) { | ||
return; | ||
} | ||
const query = highlighted > -1 ? `[data-index="${highlighted}"]` : `[data-value="${escape(value)}"]`; | ||
const val = Array.isArray(value) ? value[0] : value; | ||
const query = highlighted > -1 ? `[data-index="${highlighted}"]` : `[data-value="${escape(val)}"]`; | ||
const selected = current.querySelector(query); | ||
@@ -43,0 +44,0 @@ |
{ | ||
"name": "react-select-search", | ||
"version": "3.0.7", | ||
"version": "3.0.8", | ||
"description": "Lightweight select component for React", | ||
@@ -5,0 +5,0 @@ "main": "dist/esm/index.js", |
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
79373
1883