Skip to content

Commit

Permalink
update warning text
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre committed Nov 8, 2024
1 parent fe1c051 commit be29e54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datex-bindings/dom-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export class DOMUtils {
// warnings for invalid attribute usage
// setting the 'value' attribute of a <input> checkbox element
if (element instanceof this.context.HTMLInputElement && attr == "value" && element.getAttribute("type") == "checkbox" && typeof Datex.ReactiveValue.collapseValue(value, true, true) == "boolean") {
logger.warn(`You are assigning the "value" attribute of an <input type="checkbox"> to a boolean value. This has no effect on the checkbox state. Did you mean to use the 'checked' attribute instead\\?`)
logger.warn(`You are assigning the "value" attribute of an <input type="checkbox"> to a boolean value. This has no effect on the checkbox state. Did you mean to use the "checked" attribute instead\\?`)
}

value = value?.[JSX_INSERT_STRING] ? value.val : value; // collapse safely injected strings
Expand Down

0 comments on commit be29e54

Please sign in to comment.