Skip to content

Commit

Permalink
set buttons type to correct value
Browse files Browse the repository at this point in the history
  • Loading branch information
dhayab committed Mar 22, 2022
1 parent 56b8b2f commit bc6611e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/autocomplete-js/src/createAutocompleteDom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,18 @@ export function createAutocompleteDom<TItem extends BaseItem>({
textContent: placeholder,
});
const detachedSearchButton = createDomElement('button', {
type: 'button',
class: classNames.detachedSearchButton,
onClick(event: MouseEvent) {
event.preventDefault();
onClick() {
setIsModalOpen(true);
},
children: [detachedSearchButtonIcon, detachedSearchButtonPlaceholder],
});
const detachedCancelButton = createDomElement('button', {
type: 'button',
class: classNames.detachedCancelButton,
textContent: translations.detachedCancelButtonText,
onClick(event: MouseEvent) {
event.preventDefault();
event.stopPropagation();
autocomplete.setIsOpen(false);
setIsModalOpen(false);
Expand Down

0 comments on commit bc6611e

Please sign in to comment.