Skip to content

Commit

Permalink
Merge pull request #4138 from effective-webwork/filter-reset-page
Browse files Browse the repository at this point in the history
Reset datatable page to index 0 after filtering
  • Loading branch information
Kathrin-Huber authored Jan 8, 2021
2 parents b46f88f + 0e6730f commit 60d565e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<h:form id="processesForm">
<!--@elvariable id="process" type="org.kitodo.production.dto.ProcessDTO"-->
<p:dataTable id="processesTable"
widgetVar="processesTable"
styleClass="default-layout"
var="process"
value="#{ProcessForm.lazyDTOModel}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<p:importEnum type="org.kitodo.data.database.enums.TaskStatus" allSuffix="ALL_ENUM_VALUES"/>
<h:form id="tasksForm">
<p:dataTable id="taskTable"
widgetVar="taskTable"
var="item"
value="#{CurrentTaskForm.lazyDTOModel}"
first="#{CurrentTaskForm.firstRow}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
xmlns:p="http://primefaces.org/ui">
<p:dataTable var="item"
id="usersTable"
widgetVar="usersTable"
styleClass="default-layout"
value="#{UserForm.lazyDTOModel}"
first="#{UserForm.firstRow}"
Expand Down
1 change: 1 addition & 0 deletions Kitodo/src/main/webapp/pages/processes.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
value="#{ProcessForm.filter}"
placeholder="#{msgs.filter}">
<p:ajax event="change"
onstart="PF('processesTable').getPaginator().setPage(0);"
update="processesTabView:processesForm:processesTable"/>
</p:inputText>
<p:commandButton id="filterMenuTrigger" icon="fa fa-chevron-down"/>
Expand Down
1 change: 1 addition & 0 deletions Kitodo/src/main/webapp/pages/tasks.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
value="#{CurrentTaskForm.filter}"
placeholder="#{msgs.filter}">
<p:ajax event="change"
onstart="PF('taskTable').getPaginator().setPage(0);"
update="tasksTabView:tasksForm:taskTable"/>
</p:inputText>
<p:commandButton id="filterMenuTrigger" icon="fa fa-chevron-down"/>
Expand Down
3 changes: 2 additions & 1 deletion Kitodo/src/main/webapp/pages/users.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
value="#{UserForm.filter}"
placeholder="#{msgs.filter}">
<p:ajax event="change"
update="@all"/>
onstart="PF('usersTable').getPaginator().setPage(0);"
update="usersTabView:usersTable sticky-notifications"/>
</p:inputText>
<p:commandButton id="filterMenuTrigger" icon="fa fa-chevron-down"/>
<p:overlayPanel for="filterMenuTrigger" my="right top" at="right bottom">
Expand Down

0 comments on commit 60d565e

Please sign in to comment.