Sha256: 7feb20d1f8fbb487d1e0821e6b77a1bc64d0ca9e96394944e26b7f0c911f1d8a

Contents?: true

Size: 613 Bytes

Versions: 1573

Compression:

Stored size: 613 Bytes

Contents

To access the kit's input element attributes or add event listeners, create a `ref` inside your parent component, pass it to the kit's `ref` prop, and use `ref.current.inputNode()` with your desired attribute or event listener inside a `useEffect` hook. `useEffect` is necessary because the `ref` will be initially `undefined`. Calling `useEffect` with an empty dependency array ensures your event listeners won't be added twice.

`inputNode()` is a custom function inside the kit that returns the input DOM element and its attributes. For example, to get the `name` attribute, use `ref.current.inputNode().name`

Version data entries

1,573 entries across 1,573 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui_docs-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui_docs-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui_docs-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui_docs-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui_docs-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui_docs-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui_docs-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui_docs-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui_docs-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
playbook_ui-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md