mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Reset table pagination when search term changes (#5534)
This commit is contained in:
		@@ -253,6 +253,11 @@ export function InvenTreeTable({
 | 
				
			|||||||
  // Search term
 | 
					  // Search term
 | 
				
			||||||
  const [searchTerm, setSearchTerm] = useState<string>('');
 | 
					  const [searchTerm, setSearchTerm] = useState<string>('');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Reset the pagination state when the search term changes
 | 
				
			||||||
 | 
					  useEffect(() => {
 | 
				
			||||||
 | 
					    setPage(1);
 | 
				
			||||||
 | 
					  }, [searchTerm]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /*
 | 
					  /*
 | 
				
			||||||
   * Construct query filters for the current table
 | 
					   * Construct query filters for the current table
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user