Skip to content
This repository has been archived by the owner on Mar 7, 2018. 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 force-pushed the add-topics-chips branch 3 times, most recently from 7b2a34f to f29c6cf Compare September 15, 2017 12:27
let chips = [];
const { dataSource, externalsourceid, selectedplace } = this.props;
const { dataSource, externalsourceid, selectedplace, maintopic, termFilters } = this.props;
const chips = [];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@c-w c-w deleted the add-topics-chips branch September 15, 2017 14:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants