MCPcopy
hub / github.com/final-form/react-final-form / MySelectField

Function MySelectField

src/useField.test.js:604–613  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

602 it("should default undefined value to [] for select multiple with type prop (fix react-final-form-arrays #185)", () => {
603 const renderSpy = jest.fn();
604 const MySelectField = () => {
605 const { input } = useField("scopes", { type: "select", multiple: true });
606 renderSpy(input.value);
607 return (
608 <select {...input} multiple data-testid="select">
609 <option value="read">Read</option>
610 <option value="write">Write</option>
611 </select>
612 );
613 };
614 render(
615 <Form onSubmit={onSubmitMock}>
616 {() => (

Callers

nothing calls this directly

Calls 1

useFieldFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…