소스 검색

add docstring for new getElementValue function

Masen Furer 7 달 전
부모
커밋
ec91c85c80
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      reflex/.templates/web/utils/state.js

+ 5 - 0
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