mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-14 21:22:20 +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
|
||||
useEffect(() => {
|
||||
tableState.setPage(1);
|
||||
tableState.clearSelectedRecords();
|
||||
}, [
|
||||
tableState.searchTerm,
|
||||
tableState.filterSet.activeFilters,
|
||||
|
@@ -504,7 +504,10 @@ export function StockItemTable({
|
||||
return {
|
||||
items: table.selectedRecords,
|
||||
model: ModelType.stockitem,
|
||||
refresh: table.refreshTable,
|
||||
refresh: () => {
|
||||
table.clearSelectedRecords();
|
||||
table.refreshTable();
|
||||
},
|
||||
filters: {
|
||||
in_stock: true
|
||||
}
|
||||
|
Reference in New Issue
Block a user