How to create autocomplete form with MaterializeCss?

后端 未结 9 2496
自闭症患者
自闭症患者 2021-02-19 14:25

I am looking for autocomplete form for MaterializeCss, any plugins for this? i has try to use select2 but that\'s css not looks good

相关标签:
9条回答
  • 2021-02-19 14:44

    As mentioned above, autocomplete has been added the the materialize framework but it is still pretty limited. I'm waiting for a solution that supports values (ex Ids) icons and text.

    Re: https://github.com/Dogfalo/materialize/issues/4086

    0 讨论(0)
  • 2021-02-19 14:47

    Just write the Initialisation script inside $(document).ready(function(){});

    i.e.

    $(document).ready(function(){
        $('input.autocomplete').autocomplete({
            data: {
                "Apple": null,
                "Microsoft": null,
                "Google": null
            }
         });
    });
    
    0 讨论(0)
  • 2021-02-19 14:48

    UPDATED 1/09/2016: Autocomplete is already available officially: http://materializecss.com/forms.html#autocomplete


    I was looking for exactly the same and I think We have been lucky. They added the autocomplete recently, (not yet in the documentation). But you can see the info here https://github.com/SuperDJ/materialize/commit/3648f74542e41c3b3be4596870b7485f6ebdf176#diff-e4535828acef79852aa104417c16fe3dR157

    and the code:

    • https://github.com/SuperDJ/materialize/blob/master/bin/materialize.css

    • https://github.com/SuperDJ/materialize/blob/master/bin/materialize.js

    0 讨论(0)
提交回复
热议问题