Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6895b6c4
Commit
6895b6c4
authored
Dec 18, 2019
by
lauraMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes mutations with cursor
parent
4d7c2987
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
app/assets/javascripts/error_tracking/store/list/actions.js
app/assets/javascripts/error_tracking/store/list/actions.js
+3
-2
spec/frontend/error_tracking/store/list/actions_spec.js
spec/frontend/error_tracking/store/list/actions_spec.js
+2
-4
No files found.
app/assets/javascripts/error_tracking/store/list/actions.js
View file @
6895b6c4
...
...
@@ -76,14 +76,15 @@ export function clearRecentSearches({ commit }) {
export
const
searchByQuery
=
({
commit
,
dispatch
},
query
)
=>
{
const
searchQuery
=
query
.
trim
();
commit
(
types
.
SET_CURSOR
,
null
);
commit
(
types
.
SET_SEARCH_QUERY
,
searchQuery
);
commit
(
types
.
ADD_RECENT_SEARCH
,
searchQuery
);
dispatch
(
'
stopPolling
'
);
dispatch
(
'
startPolling
'
);
};
export
const
sortByField
=
({
commit
,
dispatch
},
field
,
cursor
)
=>
{
commit
(
types
.
SET_CURSOR
,
cursor
);
export
const
sortByField
=
({
commit
,
dispatch
},
field
)
=>
{
commit
(
types
.
SET_CURSOR
,
null
);
commit
(
types
.
SET_SORT_FIELD
,
field
);
dispatch
(
'
stopPolling
'
);
dispatch
(
'
startPolling
'
);
...
...
spec/frontend/error_tracking/store/list/actions_spec.js
View file @
6895b6c4
...
...
@@ -79,6 +79,7 @@ describe('error tracking actions', () => {
query
,
{},
[
{
type
:
types
.
SET_CURSOR
,
payload
:
null
},
{
type
:
types
.
SET_SEARCH_QUERY
,
payload
:
query
},
{
type
:
types
.
ADD_RECENT_SEARCH
,
payload
:
query
},
],
...
...
@@ -95,10 +96,7 @@ describe('error tracking actions', () => {
actions
.
sortByField
,
field
,
{},
[
{
type
:
types
.
SET_CURSOR
,
payload
:
undefined
},
{
type
:
types
.
SET_SORT_FIELD
,
payload
:
field
},
],
[{
type
:
types
.
SET_CURSOR
,
payload
:
null
},
{
type
:
types
.
SET_SORT_FIELD
,
payload
:
field
}],
[{
type
:
'
stopPolling
'
},
{
type
:
'
startPolling
'
}],
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment