Skip to content

Commit baef896

Browse files
committed
fix: replace useCallback with useMemo
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
1 parent 10075aa commit baef896

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/mui/search-input.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* limitations under the License.
1212
* */
1313

14-
import React, { useEffect, useState, useCallback } from "react";
14+
import React, { useEffect, useState, useMemo } from "react";
1515
import { TextField, IconButton, InputAdornment } from "@mui/material";
1616
import SearchIcon from "@mui/icons-material/Search";
1717
import ClearIcon from "@mui/icons-material/Clear";
@@ -30,7 +30,7 @@ const SearchInput = ({ term, onSearch, placeholder = "Search...", debounced }) =
3030
onSearch("");
3131
};
3232

33-
const onSearchDebounced = useCallback(
33+
const onSearchDebounced = useMemo(
3434
debounced ? debounce((value) => onSearch(value), DEBOUNCE_WAIT) : null,
3535
[onSearch, debounced]
3636
);

0 commit comments

Comments
 (0)