Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nos Hs2023
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Språksamlingane
stadnamn
Nos Hs2023
Commits
b2e8e4fb
Commit
b2e8e4fb
authored
6 years ago
by
Esko Ikkala
Browse files
Options
Downloads
Patches
Plain Diff
Tidy up
parent
41f0124b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/client/selectors/index.js
+0
-24
0 additions, 24 deletions
src/client/selectors/index.js
with
0 additions
and
24 deletions
src/client/selectors/index.js
+
0
−
24
View file @
b2e8e4fb
...
@@ -11,8 +11,6 @@ const getSortDirection = (state) => state.sortDirection;
...
@@ -11,8 +11,6 @@ const getSortDirection = (state) => state.sortDirection;
export
const
getVisibleResults
=
createSelector
(
export
const
getVisibleResults
=
createSelector
(
[
getResults
,
getResultsFilter
,
getSortBy
,
getSortDirection
],
[
getResults
,
getResultsFilter
,
getSortBy
,
getSortDirection
],
(
results
,
resultsFilter
,
sortBy
,
sortDirection
)
=>
{
(
results
,
resultsFilter
,
sortBy
,
sortDirection
)
=>
{
console
.
log
(
sortBy
)
console
.
log
(
sortDirection
)
const
filteredResults
=
results
.
filter
(
filterVisibleResult
(
resultsFilter
));
const
filteredResults
=
results
.
filter
(
filterVisibleResult
(
resultsFilter
));
return
_
.
orderBy
(
filteredResults
,
sortBy
,
sortDirection
);
return
_
.
orderBy
(
filteredResults
,
sortBy
,
sortDirection
);
}
}
...
@@ -20,9 +18,7 @@ export const getVisibleResults = createSelector(
...
@@ -20,9 +18,7 @@ export const getVisibleResults = createSelector(
const
filterVisibleResult
=
resultsFilter
=>
(
resultObj
)
=>
{
const
filterVisibleResult
=
resultsFilter
=>
(
resultObj
)
=>
{
for
(
const
property
in
resultsFilter
)
{
for
(
const
property
in
resultsFilter
)
{
//console.log(resultObj[property])
const
filterValues
=
resultsFilter
[
property
];
const
filterValues
=
resultsFilter
[
property
];
// console.log(property, filterValues)
if
(
filterValues
.
has
(
resultObj
[
property
]))
{
if
(
filterValues
.
has
(
resultObj
[
property
]))
{
return
false
;
return
false
;
}
}
...
@@ -48,23 +44,3 @@ export const getVisibleValues = createSelector(
...
@@ -48,23 +44,3 @@ export const getVisibleValues = createSelector(
};
};
}
}
);
);
// export const getVisibleValues = createSelector(
// [ getVisibleResults ],
// (visibleResults) => {
// let typeLabels = [];
// let broaderAreaLabels = [];
// let sources = [];
// for (const result of visibleResults) {
// typeLabels.push(result.typeLabel);
// broaderAreaLabels.push(result.broaderAreaLabel);
// sources.push(result.source);
// }
// return {
// typeLabels: Array.from(new Set(typeLabels)),
// broaderAreaLabels: Array.from(new Set(broaderAreaLabels)),
// sources: Array.from(new Set(sources)),
// };
// }
// );
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment