Skip to content

Commit

Permalink
Merge pull request #123 from bryszard/feature/customize-max-suggestio…
Browse files Browse the repository at this point in the history
…ns-on-tags
  • Loading branch information
adrianthedev authored Oct 21, 2023
2 parents a6bc315 + 5470dad commit 3a3dd8d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/2.0/fields/tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,27 @@ field :skills,
<!-- @include: ./../common/default_boolean_false.md-->
:::

:::option `suggestions_max_items`
Set of suggestions that can be displayed at once. The excessive items will be hidden and the user will have to narrow down the query to see them.

```ruby{4}
field :skills,
as: :tags,
suggestions: %w(one two three),
suggestions_max_items: 2
```

<img :src="('/assets/img/fields/tags-field/suggestions_max_items.gif')" alt="Avo tags field - suggestions max items option" class="border mb-4" />

#### Default

`20`

#### Possible values

Integers
:::

:::option `close_on_select`
Set whether the `suggestions` dropdown should close after the user makes a selection.

Expand Down
20 changes: 20 additions & 0 deletions docs/3.0/fields/tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,26 @@ field :skills,
<!-- @include: ./../common/default_boolean_false.md-->
:::

:::option `suggestions_max_items`
Set of suggestions that can be displayed at once. The excessive items will be hidden and the user will have to narrow down the query to see them.

```ruby{4}
field :skills,
as: :tags,
suggestions: %w(one two three),
suggestions_max_items: 2
```

<img :src="('/assets/img/fields/tags-field/suggestions_max_items.gif')" alt="Avo tags field - suggestions max items option" class="border mb-4" />

#### Default

`20`

#### Possible values

Integers

:::option `close_on_select`
Set whether the `suggestions` dropdown should close after the user makes a selection.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3a3dd8d

Please sign in to comment.