Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo #553

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ Defaults to a simple input with props passed to vue-simple-suggest.
```html
<!-- Vue component example (also supports nesting): -->
<vue-simple-suggest v-model="vModelGoesHere">
<my-custom-input-somponent :value="initialInputValueGoesHere"></my-custom-input-somponent>
<my-custom-input-component :value="initialInputValueGoesHere"></my-custom-input-component>
</vue-simple-suggest>
```

Expand All @@ -694,7 +694,7 @@ Custom input component **should** (in order to avoid usage limitations):
If `vue-simple-suggest` with your custom component doesn't seem to react to outside variable changes - bind both components' v-model to the same variable, like so:
```html
<vue-simple-suggest v-model="model">
<my-custom-input-somponent v-model="model"></my-custom-input-somponent>
<my-custom-input-component v-model="model"></my-custom-input-component>
</vue-simple-suggest>
```

Expand Down
3 changes: 1 addition & 2 deletions dist/cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ function _await(value, then, direct) {
var result = body();if (result && result.then) {
return result.then(_empty);
}
}
function _catch(body, recover) {
}function _catch(body, recover) {
try {
var result = body();
} catch (e) {
Expand Down
3 changes: 1 addition & 2 deletions dist/es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ function _await(value, then, direct) {
var result = body();if (result && result.then) {
return result.then(_empty);
}
}
function _catch(body, recover) {
}function _catch(body, recover) {
try {
var result = body();
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@
<span class=hljs-tag>&lt;/<span class=hljs-name>div</span>&gt;</span>
<span class=hljs-tag>&lt;/<span class=hljs-name>vue-simple-suggest</span>&gt;</span></code></pre><pre class=hljs><code><span class=hljs-comment>&lt;!-- Vue component example (also supports nesting): --&gt;</span>
<span class=hljs-tag>&lt;<span class=hljs-name>vue-simple-suggest</span> <span class=hljs-attr>v-model</span>=<span class=hljs-string>&quot;vModelGoesHere&quot;</span>&gt;</span>
<span class=hljs-tag>&lt;<span class=hljs-name>my-custom-input-somponent</span> <span class=hljs-attr>:value</span>=<span class=hljs-string>&quot;initialInputValueGoesHere&quot;</span>&gt;</span><span class=hljs-tag>&lt;/<span class=hljs-name>my-custom-input-somponent</span>&gt;</span>
<span class=hljs-tag>&lt;<span class=hljs-name>my-custom-input-component</span> <span class=hljs-attr>:value</span>=<span class=hljs-string>&quot;initialInputValueGoesHere&quot;</span>&gt;</span><span class=hljs-tag>&lt;/<span class=hljs-name>my-custom-input-component</span>&gt;</span>
<span class=hljs-tag>&lt;/<span class=hljs-name>vue-simple-suggest</span>&gt;</span></code></pre><p><strong>Custom input component caveats:</strong></p> <p>To work with the <code>vue-simple-suggest</code> your custom input component has to follow certain standard behaviours.</p> <p>Custom input component <strong>must</strong> (in order to work properly):</p> <ul class=list> <li>Emit an <code>input</code> event.</li> <li>Emit <code>focus</code> and <code>blur</code> events.</li> <li>Have a <code>value</code> prop.</li> </ul> <p>Custom input component <strong>should</strong> (in order to avoid usage limitations):</p> <ul class=list> <li>Not stop any event propagations from internal input HTML element.</li> <li>Forward an original event argument with <code>focus</code> and <code>blur</code> events.</li> </ul> <p>If <code>vue-simple-suggest</code> with your custom component doesn&#39;t seem to react to outside variable changes - bind both components&#39; v-model to the same variable, like so:</p> <pre class=hljs><code><span class=hljs-tag>&lt;<span class=hljs-name>vue-simple-suggest</span> <span class=hljs-attr>v-model</span>=<span class=hljs-string>&quot;model&quot;</span>&gt;</span>
<span class=hljs-tag>&lt;<span class=hljs-name>my-custom-input-somponent</span> <span class=hljs-attr>v-model</span>=<span class=hljs-string>&quot;model&quot;</span>&gt;</span><span class=hljs-tag>&lt;/<span class=hljs-name>my-custom-input-somponent</span>&gt;</span>
<span class=hljs-tag>&lt;<span class=hljs-name>my-custom-input-component</span> <span class=hljs-attr>v-model</span>=<span class=hljs-string>&quot;model&quot;</span>&gt;</span><span class=hljs-tag>&lt;/<span class=hljs-name>my-custom-input-component</span>&gt;</span>
<span class=hljs-tag>&lt;/<span class=hljs-name>vue-simple-suggest</span>&gt;</span></code></pre><h5 id=accessibility-on-custom-input><a class=header-link href=#accessibility-on-custom-input></a>Accessibility on custom input</h5> <blockquote> <p>New in <a href=https://github.com/KazanExpress/vue-simple-suggest/releases/tag/v1.9.0>v1.9.0</a></p> </blockquote> <p><code>vue-simple-suggest</code> automatically injects 3 necessary ARIA attributes for the default <code>&lt;input&gt;</code> element and any custom input, as long as your custom input component contains an html <code>&lt;input&gt;</code> element.</p> <p>These attributes ensure that the autocomplete can be used by users who rely on Screen Readers.</p> <table> <thead> <tr> <th>Name</th> <th>Value</th> <th>Description</th> </tr> </thead> <tbody><tr> <td>aria-autocomplete</td> <td><code>&quot;list&quot;</code></td> <td>Indicates that the autocomplete behavior of the text input is to suggest a list of possible values in a popup.</td> </tr> <tr> <td>aria-controls</td> <td>IDREF of <code>suggestions</code> list</td> <td>IDREF of the popup element that lists suggested values.</td> </tr> <tr> <td>aria-activedescendant</td> <td>IDREF of hovered option</td> <td>Enables assistive technologies to know which element the application regards as focused while DOM focus remains on the input element.</td> </tr> </tbody></table> <h5 id=custom-suggestion-item><a class=header-link href=#custom-suggestion-item></a>Custom suggestion item</h5> <blockquote> <p><code>suggestion-item</code> slot (optional)</p> </blockquote> <p><strong>Description</strong></p> <p>Allows custom html-definitons of the suggestion items in a list. Defaults to <code>&lt;span&gt;{{ displayAttribute(suggestion) }}&lt;/span&gt;</code></p> <p>Accepts the <code>suggestion</code> object and a <code>query</code> text as a <code>slot-scope</code> attribute values.</p> <pre class=hljs><code><span class=hljs-comment>&lt;!-- Example (book suggestions): --&gt;</span>
<span class=hljs-tag>&lt;<span class=hljs-name>vue-simple-suggest</span>&gt;</span>
<span class=hljs-tag>&lt;<span class=hljs-name>div</span> <span class=hljs-attr>slot</span>=<span class=hljs-string>&quot;suggestion-item&quot;</span> <span class=hljs-attr>slot-scope</span>=<span class=hljs-string>&quot;{ suggestion, query }&quot;</span>&gt;</span>
Expand Down
4 changes: 2 additions & 2 deletions docs/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions example/src/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ <h5 id="custom-input"><a class="header-link" href="#custom-input"></a>Custom inp
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">vue-simple-suggest</span>&gt;</span></code></pre><pre class="hljs"><code><span class="hljs-comment">&lt;!-- Vue component example (also supports nesting): --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">vue-simple-suggest</span> <span class="hljs-attr">v-model</span>=<span class="hljs-string">&quot;vModelGoesHere&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">my-custom-input-somponent</span> <span class="hljs-attr">:value</span>=<span class="hljs-string">&quot;initialInputValueGoesHere&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">my-custom-input-somponent</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">my-custom-input-component</span> <span class="hljs-attr">:value</span>=<span class="hljs-string">&quot;initialInputValueGoesHere&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">my-custom-input-component</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">vue-simple-suggest</span>&gt;</span></code></pre><p><strong>Custom input component caveats:</strong></p>
<p>To work with the <code>vue-simple-suggest</code> your custom input component has to follow certain standard behaviours.</p>
<p>Custom input component <strong>must</strong> (in order to work properly):</p>
Expand All @@ -959,7 +959,7 @@ <h5 id="custom-input"><a class="header-link" href="#custom-input"></a>Custom inp
</ul>
<p>If <code>vue-simple-suggest</code> with your custom component doesn&#39;t seem to react to outside variable changes - bind both components&#39; v-model to the same variable, like so:</p>
<pre class="hljs"><code><span class="hljs-tag">&lt;<span class="hljs-name">vue-simple-suggest</span> <span class="hljs-attr">v-model</span>=<span class="hljs-string">&quot;model&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">my-custom-input-somponent</span> <span class="hljs-attr">v-model</span>=<span class="hljs-string">&quot;model&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">my-custom-input-somponent</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">my-custom-input-component</span> <span class="hljs-attr">v-model</span>=<span class="hljs-string">&quot;model&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">my-custom-input-component</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">vue-simple-suggest</span>&gt;</span></code></pre><h5 id="accessibility-on-custom-input"><a class="header-link" href="#accessibility-on-custom-input"></a>Accessibility on custom input</h5>
<blockquote>
<p>New in <a href="https://github.com/KazanExpress/vue-simple-suggest/releases/tag/v1.9.0">v1.9.0</a></p>
Expand Down