From 6b120db111bfce9da7d48b6f2a040d42152acb61 Mon Sep 17 00:00:00 2001 From: Matthieu Dumont Date: Fri, 6 Jan 2017 14:28:04 +0100 Subject: [PATCH] docs(appendTo): document the option and the redrawn event --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 2fb222780..a822a8606 100644 --- a/README.md +++ b/README.md @@ -279,6 +279,8 @@ When initializing an autocomplete, there are a number of options you can configu * `openOnFocus` – If `true`, the dropdown menu will open when the input is focused. Defaults to `false`. +* `appendTo` – If set with a DOM selector, doesn't wrap the input and appends the wrapper and dropdown menu to the first DOM element matching the selector. It automatically positions the wrapper under the input, and sets it to the same width as the input. Can't be used with `hint: true`, because `hint` requires the wrapper around the input. + * `dropdownMenuContainer` – If set with a DOM selector, it overrides the container of the dropdown menu. * `templates` – An optional hash overriding the default templates. @@ -532,6 +534,8 @@ The autocomplete component triggers the following custom events. be invoked with 3 arguments: the jQuery event object, the suggestion object, and the name of the dataset the suggestion belongs to. +* `autocomplete:redrawn` – Triggered when `appendTo` is used and the wrapper is resized/repositionned. + All custom events are triggered on the element initialized as the autocomplete. ## API