Skip to content

Commit

Permalink
fix(material): avoid blur event on Select component
Browse files Browse the repository at this point in the history
  • Loading branch information
juanrgm committed Sep 21, 2023
1 parent 414843e commit d8caca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/material/src/InputBase/InputBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ const InputBase = $.component(function InputBase({

onMount(() => {
const isElement = inputRef.ref instanceof HTMLElement;
if (isControlled)
if (isControlled && isElement)
inputRef.ref.addEventListener("blur", () => {
if (attrValueOnBlur()) {
inputRef.ref.setAttribute("value", value() ?? "");
Expand Down

0 comments on commit d8caca0

Please sign in to comment.