Skip to content

Commit a39eace

Browse files
committed
fix(autocomplete): tests and add documentation
1 parent e7da699 commit a39eace

File tree

7 files changed

+737
-744
lines changed

7 files changed

+737
-744
lines changed

docs/css/ghpages-materialize.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/init.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,21 @@
182182
$('.sidenav').sidenav();
183183
$('.tap-target').tapTarget();
184184
$('input.autocomplete').autocomplete({
185-
data: { Apple: null, Microsoft: null, Google: 'https://via.placeholder.com/250x250' }
185+
minLength: 0,
186+
data: [
187+
{id: 12, text: "Apple"},
188+
{id: 13, text: "Microsoft"},
189+
{id: 42, text: "Google", image: 'http://placehold.it/250x250'}
190+
]
191+
});
192+
$('input.autocomplete-multiple').autocomplete({
193+
isMultiSelect: true,
194+
minLength: 0,
195+
data: [
196+
{id: 12, text: "Apple"},
197+
{id: 13, text: "Microsoft"},
198+
{id: 42, text: "Google", image: 'http://placehold.it/250x250'}
199+
]
186200
});
187201
$('input[data-length], textarea[data-length]').characterCounter();
188202

0 commit comments

Comments
 (0)