2
0
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:
Oliver
2025-10-13 13:08:55 +11:00
committed by GitHub
parent ea868b3179
commit f22417fd1f
2 changed files with 5 additions and 1 deletions

View File

@@ -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,

View File

@@ -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
}