Socket
Socket
Sign inDemoInstall

qbs-core

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qbs-core - npm Package Compare versions

Comparing version 1.0.43 to 1.0.44

27

dist/AutoComplete.js

@@ -82,10 +82,11 @@ "use strict";

// State Hooks Section
var _o = (0, react_1.useState)(value), inputValue = _o[0], setInputValue = _o[1];
var _p = (0, react_1.useState)(''), searchValue = _p[0], setSearchValue = _p[1];
var _q = (0, react_1.useState)(false), dropOpen = _q[0], setDropOpen = _q[1];
var _r = (0, react_1.useState)([]), selectedItems = _r[0], setSelectedItems = _r[1];
var _o = (0, react_1.useState)(true), isInitialRender = _o[0], setIsInitialRender = _o[1];
var _p = (0, react_1.useState)(value), inputValue = _p[0], setInputValue = _p[1];
var _q = (0, react_1.useState)(''), searchValue = _q[0], setSearchValue = _q[1];
var _r = (0, react_1.useState)(false), dropOpen = _r[0], setDropOpen = _r[1];
var _s = (0, react_1.useState)([]), selectedItems = _s[0], setSelectedItems = _s[1];
// API call for suggestions through a custom hook
var _s = (0, autosuggestions_1.useSuggestions)(getData, data, dropOpen, async, paginationEnabled, initialLoad
var _t = (0, autosuggestions_1.useSuggestions)(getData, data, dropOpen, async, paginationEnabled, initialLoad
// nextBlock
), suggestions = _s.suggestions, isLoading = _s.isLoading, handlePickSuggestions = _s.handlePickSuggestions;
), suggestions = _t.suggestions, isLoading = _t.isLoading, handlePickSuggestions = _t.handlePickSuggestions;
// Handling the selection of a suggestion

@@ -125,3 +126,3 @@ var handleSuggestionClick = (0, react_1.useCallback)(function (suggestion) {

setInputValue(suggestion[desc]);
onChange(selectedItems);
onChange(suggestion);
}

@@ -171,7 +172,11 @@ else {

};
//TO DO
// useEffect(() => {
// onChange(selectedItems);
// }, [selectedItems]);
(0, react_1.useEffect)(function () {
if (isInitialRender) {
setIsInitialRender(false);
}
else {
onChange(selectedItems);
}
}, [selectedItems]);
(0, react_1.useEffect)(function () {
var handleClickOutside = function (event) {

@@ -178,0 +183,0 @@ if (dropdownRef.current &&

{
"name": "qbs-core",
"version": "1.0.43",
"version": "1.0.44",
"description": "React Components",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -7,3 +7,3 @@ const path = require('path');

//...
entry: './docs',
entry: './dist',
devtool: 'source-map',

@@ -10,0 +10,0 @@ devServer: {

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