Skip to content

Commit

Permalink
cleani
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Nov 18, 2024
1 parent 56065db commit 08daede
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const ComboboxClear = forwardRef<HTMLButtonElement, ComboboxClearProps>(
const handleClear = (
event: React.MouseEvent<HTMLButtonElement, MouseEvent>,
) => {
console.log('clear', inputRef?.current);
if (!inputRef?.current) throw new Error('Input is missing');
/* narrow type to make TS happy */
if (!(inputRef?.current instanceof HTMLInputElement))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const ComboboxList = forwardRef<HTMLDataListElement, ComboboxListProps>(
useEffect(() => {
const observer = new MutationObserver((cb) => {
for (const mutation of cb) {
console.log({ mutation });
if (mutation.attributeName === 'hidden') {
setOpen(!(mutation.target as Element).hasAttribute('hidden'));
}
Expand All @@ -32,15 +31,11 @@ export const ComboboxList = forwardRef<HTMLDataListElement, ComboboxListProps>(

observer.observe(listRef.current as Node, {
attributes: true,
childList: false,
subtree: false,
});

return () => observer.disconnect();
}, [listRef]);

console.log({ open });

useEffect(() => {
if (id && listId !== id) setListId?.(id);
}, [listId, id, setListId]);
Expand Down

0 comments on commit 08daede

Please sign in to comment.