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:
Liam DeBeasi
2021-06-01 10:44:45 -04:00
committed by GitHub
parent 6cc6f4c44b
commit d527414e10

View File

@ -107,7 +107,7 @@ export class RadioGroup implements ComponentInterface {
// Get all radios inside of the radio group and then
// 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
if (ev.target && radios.includes(ev.target)) {