Comparing version 1.0.43 to 1.0.44
@@ -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
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
105793
2208