Skip to content

Commit

Permalink
Adjust IconButton rerender bevahior
Browse files Browse the repository at this point in the history
  • Loading branch information
Follpvosten committed Feb 6, 2020
1 parent 651b108 commit 06ed4e6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/icon_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,8 @@ impl Component for IconButton {
}

fn change(&mut self, props: Props) -> ShouldRender {
if props.toggle_on != self.props.toggle_on {
self.props = props;
true
} else {
false
}
self.props = props;
true
}

fn view(&self) -> Html {
Expand Down

0 comments on commit 06ed4e6

Please sign in to comment.