From ec91c85c800a15483dce646af42cfb0993cfe812 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Wed, 23 Oct 2024 16:10:20 -0700 Subject: [PATCH] add docstring for new getElementValue function --- reflex/.templates/web/utils/state.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index d4f7b5df4..b686594ad 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -863,6 +863,11 @@ export const getRefValue = (ref) => { return getElementValue(ref.current) } +/** + * Get the form submission value for a given element. + * @param el The element to get the value from. + * @returns The value. + */ export const getElementValue = (el) => { if (el.type == "checkbox") { return el.checked; // chakra