-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setFile #2128
Conversation
</div>` | ||
return yo` | ||
<div class="container ml-1"> | ||
<button class="btn btn-primary btn-sm m-1" onclick=${(e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a closure (local function) instead of writing the function inside the onclick
tag
<div class="container ml-1"> | ||
<button class="btn btn-primary btn-sm m-1" onclick=${(e) => { | ||
reject = false | ||
e.target.innerHTML = 'Accepted' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should try to adopt a reactive way of programming if possible. In this case you would create a variable accepted
, and call yo.update
. Don't change it inside this PR, I'll create an issue for that.
}}> | ||
Accept | ||
</button> | ||
<button class="btn btn-primary btn-sm m-1" onclick=${(e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, create a closure.
}}> | ||
Cancel | ||
</button> | ||
<button class="btn btn-primary btn-sm m-1" onclick=${(e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
fixes https://github.com/ethereum/remix-ide/issues/2106