Skip to content

Commit

Permalink
Set page filter to 1 for all lists when we click enter in search bar
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpzx committed Sep 6, 2022
1 parent 86f263d commit 08e5f21
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/views/Dashboards/DashboardList.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const DashboardList = () => {

const handleInputKeyup = (event) => {
if (event.code === 'Enter') {
setFilter({page: 1, term: event.target.value});
fetchItems().catch((e) =>
dispatch({ type: SET_ERROR, error: e.message })
);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/Datasets/DatasetList.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const DatasetList = () => {

const handleInputKeyup = (event) => {
if (event.code === 'Enter') {
setFilter({page: 1, term: event.target.value});
fetchItems().catch((e) =>
dispatch({ type: SET_ERROR, error: e.message })
);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/Environments/EnvironmentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const EnvironmentList = () => {

const handleInputKeyup = (event) => {
if (event.code === 'Enter') {
setFilter({page: 1, term: event.target.value});
fetchItems().catch((e) =>
dispatch({ type: SET_ERROR, error: e.message })
);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/MLStudio/NotebookList.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const NotebookList = () => {

const handleInputKeyup = (event) => {
if (event.code === 'Enter') {
setFilter({page: 1, term: event.target.value});
fetchItems().catch((e) =>
dispatch({ type: SET_ERROR, error: e.message })
);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/Notebooks/NotebookList.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const NotebookList = () => {

const handleInputKeyup = (event) => {
if (event.code === 'Enter') {
setFilter({page: 1, term: event.target.value});
fetchItems().catch((e) =>
dispatch({ type: SET_ERROR, error: e.message })
);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/Pipelines/PipelineList.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const PipelineList = () => {

const handleInputKeyup = (event) => {
if (event.code === 'Enter') {
setFilter({page: 1, term: event.target.value});
fetchItems().catch((e) =>
dispatch({ type: SET_ERROR, error: e.message })
);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/Worksheets/WorksheetList.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const WorksheetList = () => {

const handleInputKeyup = (event) => {
if (event.code === 'Enter') {
setFilter({page: 1, term: event.target.value});
fetchItems().catch((e) =>
dispatch({ type: SET_ERROR, error: e.message })
);
Expand Down

0 comments on commit 08e5f21

Please sign in to comment.