Skip to content
Open
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
11 changes: 11 additions & 0 deletions src/Autocomplete/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,17 @@ e.g. ``FoodAutocompleteField`` from above):
``tom_select_options`` (default: ``[]``)
Use this to set custom `Tom Select Options`_. If you need to set
an option using JavaScript, see `Extending Tom Select`_.
You can disable default plugins using ``tom_select_options.plugins``::

$resolver->setDefaults([
'class' => Ingredient::class,
'tom_select_options' => [
'plugins' => [
'clear_button' => false, // Disable the clear button
'remove_button' => false, // Disable the remove button
],
],
]);
Comment on lines +209 to +219
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest a new dedicated section describing: why these plugins are added by default, and how you can describe them

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a small dedicated section yep

And without a minimal explaantion on the "why" (let's maybe add a link to their documentation) ?

😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So how can we move forward here ? @raphael-geffroy you think you could add a first version of the section / paragraph suggested by @Kocal here ? If not, i'd suggest we merge this PR and open an issue for anyone to controbute ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look at it this week-end, thanks !


``options_as_html`` (default: ``false``)
Set to ``true`` if your options (e.g. ``choice_label``) contain HTML. Not
Expand Down
Loading