8000 Button ripple effect bug!? · Issue #489 · tleunen/react-mdl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 script crossorigin="anonymous" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-99b04cc350b5.js" defer="defer">
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Button ripple effect bug!? #489
Open
@edelgarat

Description

@edelgarat

After changing the value of the button, the ripple effect stops working:

import * as MDL from "react-mdl";
const { Button } = MDL;
class App extends React.Component {
	constructor() {
		super();
		this.state = { a: true };
		this.onBtnClick = this.onBtnClick.bind(this);
	}
	onBtnClick() {
		//this.setState({ a: !this.state.a });
		setTimeout(() => this.setState({ a: !this.state.a }), 100);//delay for drawing ripple effect
	}
	render() {
		return <div>
			<Button ripple style={{backgroundColor:"lightgreen"}} onClick={this.onBtnClick}>{this.state.a ? "1" : "2"}</Button>
		</div>;
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0