Skip to content

Commit

Permalink
Why does this need to be reapplied?!
Browse files Browse the repository at this point in the history
  • Loading branch information
John Rogers committed Mar 8, 2024
1 parent 935270b commit fa93938
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/components/ResultsOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function ResultsOptions({
setSearchTerm(resultsOptions.searchTerm);
}, [resultsOptions]);

useMemo((resultsOptions, setResultsOptions) => {
useMemo(() => {
let thisOptions = { ...resultsOptions };
thisOptions.searchTerm = debouncedSearchTerm;
setResultsOptions(thisOptions);
Expand Down Expand Up @@ -120,9 +120,9 @@ export default function ResultsOptions({
</Typography>
<Switch
checked={resultsOptions.intraInstrument}
onChange={(e, value) => {
onChange={(event) => {
let thisOptions = { ...resultsOptions };
thisOptions.intraInstrument = value;
thisOptions.intraInstrument = event.target.checked;
setResultsOptions(thisOptions);
}}
/>
Expand All @@ -138,9 +138,9 @@ export default function ResultsOptions({
<Typography id="withinInstruments">Just selected matches</Typography>
<Switch
checked={resultsOptions.onlySelected}
onChange={(e, value) => {
onChange={(event) => {
let thisOptions = { ...resultsOptions };
thisOptions.onlySelected = value;
thisOptions.onlySelected = event.target.checked;
setResultsOptions(thisOptions);
}}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ export default function Upload({
localFileInfos.current = fi;
}, []);

const syncFileInfos = useCallback((setAppFileInfos) => {
const syncFileInfos = useCallback(() => {
console.log("syncing fileinfo");
setAppFileInfos(localFileInfos.current);
dirty.current = false;
}, []);
}, [setAppFileInfos]);

function filesReceiver(fileList) {
const files = Array.from(fileList);
Expand Down Expand Up @@ -173,7 +173,7 @@ export default function Upload({
) {
return fi;
} else {
return null
return null;
}
})
.filter((i) => {
Expand Down

0 comments on commit fa93938

Please sign in to comment.