Skip to content

Commit

Permalink
Set autocomplete to off when component enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Piatek committed Jan 25, 2022
1 parent 519863c commit bd1cd3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% end %>

<div class="max-w-screen-xs">
<input type="text" placeholder="Company name" class="w-full" />
<input type="text" placeholder="Company name" class="w-full" name="company" />
</div>

<% content_for :component do %>
Expand Down
2 changes: 2 additions & 0 deletions src/core/CompanyAutocomplete/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ const handleEnter = (input, event) => {
const CompanyAutocomplete = (input, url) => {
if (!input || !url) return;

input.setAttribute("autocomplete", "off");

input.addEventListener(
"keyup",
throttle(
Expand Down

0 comments on commit bd1cd3f

Please sign in to comment.