Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
event attr to data
Browse files Browse the repository at this point in the history
  • Loading branch information
FeodorFitsner committed Dec 3, 2020
1 parent 8659aa9 commit 04363c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/controls/Button.js
Expand Up @@ -15,7 +15,7 @@ const button = React.memo(({control}) => {
};

const handleClick = e => {
ws.pageEventFromWeb(control.i, 'clicked', control.event)
ws.pageEventFromWeb(control.i, 'clicked', control.data)
}

return <ButtonType onClick={handleClick} {...buttonProps} />;
Expand Down
4 changes: 2 additions & 2 deletions tests/test-add-command.ps1
Expand Up @@ -144,8 +144,8 @@ try {
checkbox id=agree label='I agree to the terms of services'"

pglet_send "add stack at=0 id=buttons horizontal=true
button id=submit text=Submit primary=yes event=btn_event
button id=cancel event=btn_event2"
button id=submit text=Submit primary=yes data=btn_event
button id=cancel data=btn_event2"

Start-Sleep -s 2

Expand Down

0 comments on commit 04363c4

Please sign in to comment.