Giter Site home page Giter Site logo

Comments (6)

marconi1992 avatar marconi1992 commented on June 10, 2024 1

Yes I want populate the filterable list with that. I forked your library and I'm working in implement it, I'm going to make a pull request when the changes are available.

Thanks for the quick reply.

from materialchipsinput.

marconi1992 avatar marconi1992 commented on June 10, 2024 1

Hi, In my case I used an AutocompleteTextView instead of the default list, therefore you can implement a custom adapter to get the data on-demand.
marconi1992@565a92d

        mBusinessTags.setFilterableList(new ArrayList<ChipInterface>()); // init empty default list

        mTagSuggestionsAdapter = new TagSuggestionsAdapter(getContext(), TagRepository.BUSINESS_SCOPE);

        mBusinessTags.getEditText().setAdapter(mTagSuggestionsAdapter);
        mBusinessTags.getEditText().setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                mBusinessTags.addChip(mTagSuggestionsAdapter.getItem(position));
            }
        });

If someone wants to implement it needs replace the official dependency by this

compile 'com.github.marconi1992:MaterialChipsInput:1.1.2'

it's just a temporary fix, I hope we might find a better solution.

from materialchipsinput.

pchmn avatar pchmn commented on June 10, 2024

You want to make a request to your REST API based on what the users typed, and populate the filterable list with that ? So each time the user types, you make your request to your API and get a list already filtered ?

If this is what your want, for now this is not possible, and you have to make the view that shows the suggestions on your own. Because, for now, the FilterableList is supposed to be all the suggestions, and not a list of suggestions already filtered.

But It can be a good thing to add this feature in the library. I will look into it.

from materialchipsinput.

janakagamini avatar janakagamini commented on June 10, 2024

Hi @marconi1992, this would be quite useful as most of the time, the data required to populate the list is supplied by an external API, and the dataset could be very large to pre-load it when setting up the view.

What's your strategy for implementing this?

from materialchipsinput.

or-else avatar or-else commented on June 10, 2024

It would also be useful if the dataset is local but too large to load into memory at once.

from materialchipsinput.

VexGod avatar VexGod commented on June 10, 2024

@marconi1992 can you link the TagSuggestionAdapter ??

from materialchipsinput.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.