Skip to content

Commit

Permalink
fix(components): duplicate attrs binding in Form
Browse files Browse the repository at this point in the history
Remove explicit attrs binding
  • Loading branch information
joshuagraber committed Aug 20, 2024
1 parent e2d6a29 commit bfdd8c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions src/components/Form/PdapForm.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<template>
<form
:id="id"
:name="name"
:v-bind="$attrs"
class="pdap-form"
@submit.prevent="submit"
>
<form :id="id" :name="name" class="pdap-form" @submit.prevent="submit">
<div
v-if="typeof errorMessage === 'string'"
class="pdap-form-error-message"
Expand Down
4 changes: 2 additions & 2 deletions src/components/Form/__snapshots__/form.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Form component > Renders component in form error state 1`] = `
<form class="pdap-form" id="test" name="test" v-bind="[object Object]">
<form class="pdap-form" id="test" name="test">
<div class="pdap-form-error-message">This form is incorrect</div>
<div class="pdap-input pdap-input-text">
<input id="test-1" name="testOne" placeholder="Enter a value here" type="text">
Expand Down Expand Up @@ -38,7 +38,7 @@ exports[`Form component > Renders component in form error state 1`] = `
`;
exports[`Form component > Renders component in static state 1`] = `
<form class="pdap-form" id="test" name="test" v-bind="[object Object]">
<form class="pdap-form" id="test" name="test">
<!--v-if-->
<div class="pdap-input pdap-input-text">
<input id="test-1" name="testOne" placeholder="Enter a value here" type="text">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`QuickSearchForm component > Renders a QuickSearchForm 1`] = `
</p>
</div>
<div class="pdap-quick-search-form h-full max-h-[75-vh] justify-start p-0">
<form class="pdap-form flex flex-wrap gap-x-4" id="quick-search-form" name="quickSearchForm" v-bind="[object Object]">
<form class="pdap-form flex flex-wrap gap-x-4" id="quick-search-form" name="quickSearchForm">
<!--v-if-->
<div class="pdap-input pdap-input-text">
<input id="search-term" name="searchTerm" placeholder="Enter a keyword, or &#x27;all&#x27;" type="text">
Expand Down

0 comments on commit bfdd8c2

Please sign in to comment.