mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
chore(radio-group): clean up code to reuse helper function (#23396)
Co-authored-by: Daniel Simão <danielsimao@users.noreply.github.com>
This commit is contained in:
@ -107,7 +107,7 @@ export class RadioGroup implements ComponentInterface {
|
|||||||
|
|
||||||
// Get all radios inside of the radio group and then
|
// Get all radios inside of the radio group and then
|
||||||
// filter out disabled radios since we need to skip those
|
// filter out disabled radios since we need to skip those
|
||||||
const radios = Array.from(this.el.querySelectorAll('ion-radio')).filter(radio => !radio.disabled);
|
const radios = this.getRadios().filter(radio => !radio.disabled);
|
||||||
|
|
||||||
// Only move the radio if the current focus is in the radio group
|
// Only move the radio if the current focus is in the radio group
|
||||||
if (ev.target && radios.includes(ev.target)) {
|
if (ev.target && radios.includes(ev.target)) {
|
||||||
|
Reference in New Issue
Block a user