Skip to content

Commit ff355bf

Browse files
authored
Merge pull request #500 from saasquatch/fix-checkbox
fix issues with checkbox field
2 parents e22bed0 + c886409 commit ff355bf

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@saasquatch/mint-components": patch
3+
---
4+
5+
Fixes issue with the checkbox not properly being set as required in registration forms

packages/mint-components/src/components.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ export namespace Components {
456456
*/
457457
"checkboxLabelLink"?: string;
458458
/**
459-
* @uiName Checkbox label link lext
459+
* @uiName Checkbox label link text
460460
*/
461461
"checkboxLabelLinkText"?: string;
462462
/**
@@ -8556,7 +8556,7 @@ declare namespace LocalJSX {
85568556
*/
85578557
"checkboxLabelLink"?: string;
85588558
/**
8559-
* @uiName Checkbox label link lext
8559+
* @uiName Checkbox label link text
85608560
*/
85618561
"checkboxLabelLinkText"?: string;
85628562
/**

packages/mint-components/src/components/sqm-checkbox-field/sqm-checkbox-field-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export function CheckboxFieldView(props: CheckboxFieldViewProps) {
9191
e.target.value = e.target.checked;
9292
callbacks.setChecked(e.target.value);
9393
}}
94-
{...(!content.checkboxOptional ? { required: false } : [])}
94+
{...(!content.checkboxOptional ? { required: true } : [])}
9595
disabled={
9696
states.registrationFormState?.loading ||
9797
states.registrationFormState?.disabled

packages/mint-components/src/components/sqm-checkbox-field/sqm-checkbox-field.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { useCheckboxField } from "./useCheckboxField";
1919
*/
2020
@Component({
2121
tag: "sqm-checkbox-field",
22-
shadow: true,
22+
shadow: false,
2323
})
2424
export class CheckboxField {
2525
@State()
@@ -46,7 +46,7 @@ export class CheckboxField {
4646
@Prop() checkboxLabelLink?: string = "https://example.com";
4747

4848
/**
49-
* @uiName Checkbox label link lext
49+
* @uiName Checkbox label link text
5050
*/
5151
@Prop() checkboxLabelLinkText?: string = "Terms and Conditions";
5252

0 commit comments

Comments
 (0)