add docstring for new getElementValue function
This commit is contained in:
parent
bb597cf7d6
commit
ec91c85c80
@ -863,6 +863,11 @@ export const getRefValue = (ref) => {
|
|||||||
return getElementValue(ref.current)
|
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) => {
|
export const getElementValue = (el) => {
|
||||||
if (el.type == "checkbox") {
|
if (el.type == "checkbox") {
|
||||||
return el.checked; // chakra
|
return el.checked; // chakra
|
||||||
|
Loading…
Reference in New Issue
Block a user