Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset datatable page to index 0 after filtering #4138

Merged
merged 1 commit into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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