Skip to content

Commit

Permalink
Merge pull request #70 from certego/develop
Browse files Browse the repository at this point in the history
v0.1.10
  • Loading branch information
drosetti authored Nov 24, 2023
2 parents eddb477 + f4c3f6e commit 5e1ef36
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

**[Get it on npm](https://www.npmjs.com/package/certego-ui)**

## [v0.1.10](https://github.com/certego/certego-ui/releases/tag/v0.1.9)
Fixed bug in debounce filter

## [v0.1.9](https://github.com/certego/certego-ui/releases/tag/v0.1.9)
Update axios and "size" property

Expand Down
2 changes: 1 addition & 1 deletion example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/src/layouts/AppFooter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FaTwitter } from "react-icons/fa";
import { Toaster, ScrollToTopButton, useToastr } from "@certego/certego-ui";

// constants
const CERTEGO_UI_VERSION = "v0.1.9";
const CERTEGO_UI_VERSION = "v0.1.10";
const selector = (state) => state.toasts;

function AppFooter() {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@certego/certego-ui",
"version": "0.1.9",
"version": "0.1.10",
"description": "certego components library (react.js, reactstrap, etc)",
"author": "certego",
"license": "MIT",
Expand Down
11 changes: 8 additions & 3 deletions src/hooks/useDebounceInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ import React from "react";
* React hook for debounce input.
*/
export default function useDebounceInput(inputValue, delay, setFunction) {
React.useEffect(() => {
const initialized = React.useRef("");
React.useEffect(() => {
if (initialized.current !== inputValue) {
initialized.current = inputValue;
const timer = setTimeout(() => {
setFunction(inputValue);
}, delay);
return () => clearTimeout(timer);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [inputValue]);
}
return null;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [inputValue]);
}

0 comments on commit 5e1ef36

Please sign in to comment.