mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-15 05:32:21 +00:00
[UI] Fix stock actions (#10566)
* Clear selected records when search term changes * Clear selection after performing stock actions
This commit is contained in:
@@ -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,
|
||||||
|
@@ -504,7 +504,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