Comments (2)
type SwitchItemProps = {
field: FieldConfig<CustomerProductLocationsItem>;
};
function SwitchItem({field}: SwitchItemProps) {
const ref = useRef<HTMLFieldSetElement>(null);
const {location, locationType} = useFieldset(ref, field);
return (
<fieldset ref={ref}>
<input {...conform.input(location)} />
<input {...conform.input(locationType)} />
</fieldset>
);
}
from conform.
const [form, fields] = useForm({
lastSubmission,
defaultValue: defaultValues,
});
from conform.
Related Issues (20)
- When opening the React developer tools and pointing to a component using `useForm`, there is an error displaying component properties HOT 1
- Conditional fields lose their value when not present HOT 1
- docs: no ids for `h3` headings, leading to 404 links
- Selecting a file with file input does not change form.dirty value to true
- superRefine not working with descriminatedUnion
- Form#:rf: does not exist HOT 2
- Make discriminated unions merge when using getFieldset / getFieldList HOT 2
- `FormStateInput` Form state not persisted HOT 3
- File input not marked as dirty if useForm's defaultValue is defined HOT 1
- `useControl` strange behaviour HOT 1
- Conform breaks Remix <Form /> submission with clientAction HOT 1
- Default value breaks types HOT 5
- [v1] defaultValue being cached HOT 10
- Insert, remove and reorder intents do not work with button type = button HOT 1
- field.value and useInputControl().value does not stay in sync HOT 3
- Next.js 14 error after return submission.reply() HOT 1
- Inserting to a nested fieldlist reset last value HOT 15
- [Docs]: Make TOC dropdown links more obvious HOT 1
- Property 'getFieldset' does not exist on type 'FieldMetadata' HOT 6
- Expose type that is attached to `fields` to able to properly type when passing `fields` as a prop to child components
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conform.