Skip to content
This repository has been archived by the owner. It is now read-only.

Add topics chips #64

Merged
merged 5 commits into from Sep 15, 2017
Merged

Add topics chips #64

merged 5 commits into from Sep 15, 2017

Conversation

@c-w
Copy link
Contributor

@c-w c-w commented Sep 15, 2017

NB: there isn't an "x" to remove the maintopic filter because we always require the maintopic to be defined in the graphql queries.

@c-w c-w requested a review from erikschlegel Sep 15, 2017
@c-w c-w force-pushed the add-topics-chips branch 3 times, most recently from 7b2a34f to f29c6cf Sep 15, 2017
@c-w c-w force-pushed the add-topics-chips branch from f29c6cf to 24f5b1b Sep 15, 2017
let chips = [];
const { dataSource, externalsourceid, selectedplace } = this.props;
const { dataSource, externalsourceid, selectedplace, maintopic, termFilters } = this.props;
const chips = [];
Copy link
Collaborator

@erikschlegel erikschlegel Sep 15, 2017

why is chips defined as a const if it's mutable?

Copy link
Contributor Author

@c-w c-w Sep 15, 2017

It's a mutable object, not a mutable reference. Same reason why this works in Java:

final List<String> foo = new ArrayList<>();

// this works since foo is a mutable type
foo.add("something");

// this doesn't work since foo is an immutable reference
foo = new ArrayList<>();

@c-w c-w merged commit 77d6bc5 into master Sep 15, 2017
2 checks passed
@c-w c-w deleted the add-topics-chips branch Sep 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants