|
|
@ -80,23 +80,6 @@ export const ManualSearchModal: FunctionComponent<Props & BaseModalProps> = (
|
|
|
|
|
|
|
|
|
|
|
|
const columns = useMemo<Column<SearchResultType>[]>(
|
|
|
|
const columns = useMemo<Column<SearchResultType>[]>(
|
|
|
|
() => [
|
|
|
|
() => [
|
|
|
|
{
|
|
|
|
|
|
|
|
accessor: "subtitle",
|
|
|
|
|
|
|
|
Cell: ({ row, externalUpdate }) => {
|
|
|
|
|
|
|
|
const result = row.original;
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<AsyncButton
|
|
|
|
|
|
|
|
size="sm"
|
|
|
|
|
|
|
|
variant="light"
|
|
|
|
|
|
|
|
noReset
|
|
|
|
|
|
|
|
promise={() => onSelect(item!, result)}
|
|
|
|
|
|
|
|
onSuccess={() => externalUpdate && externalUpdate(row)}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<FontAwesomeIcon icon={faDownload}></FontAwesomeIcon>
|
|
|
|
|
|
|
|
</AsyncButton>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Header: "Score",
|
|
|
|
Header: "Score",
|
|
|
|
accessor: (d) => `${d.score}%`,
|
|
|
|
accessor: (d) => `${d.score}%`,
|
|
|
@ -157,7 +140,7 @@ export const ManualSearchModal: FunctionComponent<Props & BaseModalProps> = (
|
|
|
|
<Dropdown>
|
|
|
|
<Dropdown>
|
|
|
|
<Dropdown.Toggle
|
|
|
|
<Dropdown.Toggle
|
|
|
|
disabled={value.length === 1}
|
|
|
|
disabled={value.length === 1}
|
|
|
|
className="dropdown-hidden text-dark opacity-100"
|
|
|
|
className="dropdown-hidden text-dark"
|
|
|
|
variant={value.length === 1 ? "link" : "light"}
|
|
|
|
variant={value.length === 1 ? "link" : "light"}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{display}
|
|
|
|
{display}
|
|
|
@ -181,6 +164,23 @@ export const ManualSearchModal: FunctionComponent<Props & BaseModalProps> = (
|
|
|
|
return <StateIcon matches={matches} dont={dont_matches}></StateIcon>;
|
|
|
|
return <StateIcon matches={matches} dont={dont_matches}></StateIcon>;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
accessor: "subtitle",
|
|
|
|
|
|
|
|
Cell: ({ row, externalUpdate }) => {
|
|
|
|
|
|
|
|
const result = row.original;
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<AsyncButton
|
|
|
|
|
|
|
|
size="sm"
|
|
|
|
|
|
|
|
variant="light"
|
|
|
|
|
|
|
|
noReset
|
|
|
|
|
|
|
|
promise={() => onSelect(item!, result)}
|
|
|
|
|
|
|
|
onSuccess={() => externalUpdate && externalUpdate(row)}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<FontAwesomeIcon icon={faDownload}></FontAwesomeIcon>
|
|
|
|
|
|
|
|
</AsyncButton>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
[onSelect, item]
|
|
|
|
[onSelect, item]
|
|
|
|
);
|
|
|
|
);
|
|
|
|