Skip to content

Commit

Permalink
Merge pull request #11866 from primefaces/issue-11861
Browse files Browse the repository at this point in the history
Fixed #11861 - RadioButton | can't get the value from onClick event
  • Loading branch information
cetincakiroglu authored Aug 24, 2022
2 parents e80f7b5 + 20c81eb commit ff01bb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/components/radiobutton/radiobutton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class RadioButton implements ControlValueAccessor, OnInit, OnDestroy {
this.checked = true;
this.onModelChange(this.value);
this.registry.select(this);
this.onClick.emit(event);
this.onClick.emit({originalEvent: event, value: this.value});
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/app/showcase/components/radiobutton/radiobuttondemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ <h5>Events</h5>
<tbody>
<tr>
<td>onClick</td>
<td>event: Click event</td>
<td>event.originalEvent: Click event<br>
event.value: Value of the radio button
</td>
<td>Callback to invoke on radio button click.</td>
</tr>
<tr>
Expand Down

0 comments on commit ff01bb7

Please sign in to comment.