You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attributes column="sm" and column="lg" on <Form.Label> generates the following error in VSCode when using TypeScript:
TypeScript error in /home/sylmarch/workspace/my-project/src/components/MyComponent.tsx(55,53):
No overload matches this call.
Overload 1 of 2, '(props: Readonly<Pick<Pick<DetailedHTMLProps<LabelHTMLAttributes, HTMLLabelElement>, "form" | ... 255 more ... | "htmlFor"> & { ...; }, "ref" | ... 255 more ... | "is"> & BsPrefixProps<...> & FormLabelWithColProps> | Readonly<...>): FormLabel', gave the following error.
Type 'string' is not assignable to type 'boolean | undefined'.
Overload 2 of 2, '(props: ReplaceProps<"label", (BsPrefixProps<"label"> & FormLabelWithColProps) | (BsPrefixProps<"label"> & FormLabelOwnProps)>, context?: any): FormLabel', gave the following error.
Type 'string' is not assignable to type 'boolean | undefined'. TS2769
53 | <Form.Group>
54 | <Form.Row>
55 | <Form.Label column="lg" lg={2}>
| ^
56 | Large Text
57 | </Form.Label>
58 |
* #5056 fix types for FormLabel
Fixes#5056 and adds 'sm' and 'lg' as types for FormLabel column
* Update simple.test.tsx
Updated with test for types on Form.Label column
Co-authored-by: Tor Raswill <tor.raswill@dqc.se>
Describe the bug
Attributes
column="sm"
andcolumn="lg"
on<Form.Label>
generates the following error in VSCode when using TypeScript:To Reproduce
Copy the sample code from the documentation (https://react-bootstrap.netlify.com/components/forms/#horizontal-forms-label-sizing) :
Expected behavior
column
value can also be a string (lg
orsm
).Environment (please complete the following information)
The text was updated successfully, but these errors were encountered: