Materialize: chips-autocomplete & chips-placeholder don't work together

Created on 22 Feb 2017  路  4Comments  路  Source: Dogfalo/materialize

If .chips-autocomplete and .chips-placeholder were both set on a .chip the placeholder javascript code does not do anything visible. When you remove the .chips-autocomplete it starts working again.

http://codepen.io/anon/pen/VpZVxJ

Most helpful comment

You are calling chips twice on the same element. When you init the chips autocomplete you are overriding your previous options. You can combine the options into one call.

All 4 comments

You are calling chips twice on the same element. When you init the chips autocomplete you are overriding your previous options. You can combine the options into one call.

@acburst can you show us how?

I think he try to say something like this:
$('.chips-autocomplete').chips({
placeholder: "Escribenos tus sintomas aqui",

and then the autocomplete...

chips-css

@kartikchauhan @ahmetb

i have managed to do it with the code above, the class used to initialize can be anything i suppose as long as it matches the class used in your chips div element.
note the code above sets a placeholder, initial tag and auto completion all at once. (_sensitive information blurred out ;)_)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cope picture cope  路  3Comments

onigetoc picture onigetoc  路  3Comments

ericlormul picture ericlormul  路  3Comments

Robouste picture Robouste  路  3Comments

lpgeiger picture lpgeiger  路  3Comments