Skip to content

Commit

Permalink
Fixes clear button on Inventory page to also clear the product images…
Browse files Browse the repository at this point in the history
…/datasheets/pinouts etc
  • Loading branch information
replaysMike committed Mar 12, 2023
1 parent a709f01 commit 5d2d423
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Binner/Binner.Web/ClientApp/src/pages/Inventory.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function Inventory(props) {
};

const [viewPreferences, setViewPreferences] = useState(defaultViewPreferences);
const [infoResponse, setInfoResponse] = useState([]);
const [infoResponse, setInfoResponse] = useState({});
const [datasheetTitle, setDatasheetTitle] = useState("");
const [datasheetPartName, setDatasheetPartName] = useState("");
const [datasheetDescription, setDatasheetDescription] = useState("");
Expand Down Expand Up @@ -706,6 +706,7 @@ export function Inventory(props) {
setLoadingPartMetadata(false);
setLoadingPartTypes(false);
setLoadingProjects(false);
setInfoResponse({});
if (clearAll && viewPreferences.rememberLast) {
updateViewPreferences({ lastQuantity: clearedPart.quantity, lowStockThreshold: clearedPart.lowStockThreshold, lastPartTypeId: clearedPart.partTypeId, lastMountingTypeId: clearedPart.mountingTypeId, lastProjectId: clearedPart.projectId });
}
Expand Down

0 comments on commit 5d2d423

Please sign in to comment.