mirror of
https://github.com/inventree/InvenTree.git
synced 2025-11-13 19:36:46 +00:00
* Clear selected records when search term changes
* Clear selection after performing stock actions
(cherry picked from commit f22417fd1f)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ff79ab87e5
commit
6fa54c0e0e
@@ -352,6 +352,7 @@ export function InvenTreeTable<T extends Record<string, any>>({
|
|||||||
// Reset the pagination state when the search term changes
|
// Reset the pagination state when the search term changes
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
tableState.setPage(1);
|
tableState.setPage(1);
|
||||||
|
tableState.clearSelectedRecords();
|
||||||
}, [
|
}, [
|
||||||
tableState.searchTerm,
|
tableState.searchTerm,
|
||||||
tableState.filterSet.activeFilters,
|
tableState.filterSet.activeFilters,
|
||||||
|
|||||||
@@ -507,7 +507,10 @@ export function StockItemTable({
|
|||||||
return {
|
return {
|
||||||
items: table.selectedRecords,
|
items: table.selectedRecords,
|
||||||
model: ModelType.stockitem,
|
model: ModelType.stockitem,
|
||||||
refresh: table.refreshTable,
|
refresh: () => {
|
||||||
|
table.clearSelectedRecords();
|
||||||
|
table.refreshTable();
|
||||||
|
},
|
||||||
filters: {
|
filters: {
|
||||||
in_stock: true
|
in_stock: true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user