Skip to content

Commit

Permalink
When searching a table, reset to page 1, but nothing else
Browse files Browse the repository at this point in the history
Before all sorting etc was reset
  • Loading branch information
carlhoerberg committed Jan 8, 2024
1 parent dae5a82 commit 373a7ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/js/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ function renderTable (id, options = {}, renderRow) {
container.addEventListener('keyup', e => {
if (!e.target.classList.contains('filter-table')) return true
if (e.key === 'Enter') {
dataSource.reset()
dataSource.searchTerm = e.target.value
dataSource.page = 1
reload()
}
})
Expand Down

0 comments on commit 373a7ac

Please sign in to comment.