mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
fix: globalSearchShow.
This commit is contained in:
@@ -38,9 +38,6 @@ export function ItemsMultiSelect({
|
|||||||
[isItemSelected],
|
[isItemSelected],
|
||||||
);
|
);
|
||||||
|
|
||||||
// Count selected items.
|
|
||||||
const countSelected = localSelected.length;
|
|
||||||
|
|
||||||
// Handle item selected.
|
// Handle item selected.
|
||||||
const handleItemSelect = useCallback(
|
const handleItemSelect = useCallback(
|
||||||
({ id }) => {
|
({ id }) => {
|
||||||
@@ -77,13 +74,16 @@ export function ItemsMultiSelect({
|
|||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Count selected items.
|
||||||
|
const countSelected = itemsSelected().length;
|
||||||
|
|
||||||
// Clear Button
|
// Clear Button
|
||||||
const clearButton =
|
const clearButton =
|
||||||
countSelected > 0 ? (
|
countSelected > 0 ? (
|
||||||
<Button
|
<Button
|
||||||
icon="cross"
|
icon="cross"
|
||||||
minimal={true}
|
minimal={true}
|
||||||
onClick={() => setLocalSelected([])}
|
// onClick={() => setLocalSelected([])}
|
||||||
/>
|
/>
|
||||||
) : undefined;
|
) : undefined;
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,7 @@ function Search({
|
|||||||
openGlobalSearch,
|
openGlobalSearch,
|
||||||
closeGlobalSearch,
|
closeGlobalSearch,
|
||||||
}) {
|
}) {
|
||||||
const items = [
|
const items = [];
|
||||||
{ title: 'The Shawshank Redemption', year: 1994 },
|
|
||||||
{ title: 'The Godfather', year: 1972 },
|
|
||||||
{ title: 'The Godfather: Part II', year: 1974 },
|
|
||||||
];
|
|
||||||
|
|
||||||
const renderSearch = (search, { handleClick }) => (
|
const renderSearch = (search, { handleClick }) => (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|||||||
Reference in New Issue
Block a user