Sha256: 42aa881eaafe635daec438edfa474731d9961ae468d7dd125ee9a85ef11ef4ca
Contents?: true
Size: 533 Bytes
Versions: 203
Compression:
Stored size: 533 Bytes
Contents
import PbEnhancedElement from "../pb_enhanced_element" const RADIO_SELECTOR = "[data-pb-radio-children]" const RADIO_WRAPPER_SELECTOR = "[data-pb-radio-children-wrapper]" export default class PbRadio extends PbEnhancedElement { static get selector() { return RADIO_SELECTOR } connect() { const radioWrapperElement = this.element.parentElement.querySelector(RADIO_WRAPPER_SELECTOR) radioWrapperElement.addEventListener("click", () => { this.element.querySelector("input[type='radio']").click() }) } }
Version data entries
203 entries across 203 versions & 1 rubygems