Skip to content

Conversation

@Glignos
Copy link
Member

@Glignos Glignos commented Oct 21, 2020

No description provided.


render() {
return(
<Overridable id={'ToggleComponent'}>
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure the overridable id is ok to be the same as the name of the component here ? Also, we will need to pass down the props i.e <Overridable id={'ToggleComponent'}> {...this.props} so they can be available when you override the component I think....

@Glignos Glignos force-pushed the add_toggle_filter_element branch 2 times, most recently from 0720535 to 9a6f9bb Compare October 21, 2020 14:26
Copy link
Contributor

@ntarocco ntarocco left a comment

Choose a reason for hiding this comment

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

LGTM!
Minor: it would be great if you create a new doc page, even empty, only title, so that at some point we document this component too and it is not forgotten!

}

_isChecked = (userSelectionFilters) => {
let isFilterActive = !_isEmpty(userSelectionFilters.filter(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let isFilterActive = !_isEmpty(userSelectionFilters.filter(
const isFilterActive = userSelectionFilters.filter(...).length > 0

class ToggleComponent extends Component{
constructor(props) {
super(props);
this.title = props.title;
Copy link
Contributor

Choose a reason for hiding this comment

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

very minor: because of a "bad" habit, we started doing this in the constructor... it is probably not needed, and props can be used directly. Feel free to improve code! :)

@Glignos Glignos force-pushed the add_toggle_filter_element branch from 9a6f9bb to 53c84e2 Compare October 23, 2020 11:54
@zzacharo zzacharo merged commit a7235ff into inveniosoftware:master Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants