@itenthusiasm/custom-elements 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -283,7 +283,9 @@ class CheckboxGroup extends HTMLElement {
|
|
|
283
283
|
else if (rangeUnderflow) message = this.rangeUnderflowError;
|
|
284
284
|
else if (valueMissing) message = this.valueMissingError;
|
|
285
285
|
else if (rangeOverflow) message = this.rangeOverflowError;
|
|
286
|
-
|
|
286
|
+
|
|
287
|
+
const anchor = message ? /** @type {HTMLInputElement} */ (this.fieldset.elements[0]) : undefined;
|
|
288
|
+
this.#internals.setValidity({ valueMissing, rangeUnderflow, rangeOverflow, customError }, message, anchor);
|
|
287
289
|
}
|
|
288
290
|
|
|
289
291
|
/* ------------------------------ Form Control Callbacks ------------------------------ */
|
package/CheckboxGroup/README.md
CHANGED
|
@@ -147,8 +147,8 @@ Some JS frameworks (such as React) may get confused if you remove elements from
|
|
|
147
147
|
|
|
148
148
|
```tsx
|
|
149
149
|
import { useState, useEffect } from "react";
|
|
150
|
-
import type {} from "@itenthusiasm/custom-elements/react";
|
|
151
|
-
// Or import type {} from "@itenthusiasm/custom-elements/CheckboxGroup/react";
|
|
150
|
+
import type {} from "@itenthusiasm/custom-elements/types/react";
|
|
151
|
+
// Or import type {} from "@itenthusiasm/custom-elements/CheckboxGroup/types/react";
|
|
152
152
|
|
|
153
153
|
interface CheckboxGroupProps extends React.ComponentProps<"checkbox-group"> {
|
|
154
154
|
label?: string;
|
package/package.json
CHANGED