Explorar el Código

Choose null instead of empty string for value

The value attribute of fields expect a string. We use a sentinel value
to clear the field.
master
TheoryOfNekomata hace 1 año
padre
commit
1505606ad7
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. +1
    -3
      src/index.ts

+ 1
- 3
src/index.ts Ver fichero

@@ -1311,9 +1311,7 @@ export const clearFormValues = (
);
const elementsWithSameName = getElementsOfSameName(filteredFieldElements);
const objectValues = Object.fromEntries(
Object.entries(elementsWithSameName).map(([key]) => [
key, '',
]),
Object.entries(elementsWithSameName).map(([key]) => [key, null]),
);
doSetFormValues(filteredFieldElements, elementsWithSameName, objectValues);
};


Cargando…
Cancelar
Guardar