Skip to content

No results found option #60

Open
Open

Description

@rrcdr

twitter/typeahead.js#780

I know that I can specify an empty template for each dataset, but I have 6 or 7 datasets and I would like to specify something to be displayed when none of the datasets have hits.

If I just type in "4q8nywrfxm", I don't want to see 6 datasets all saying that they can't find that text, I just want one message, specified at the typeahead level (not the dataset level).

Does that make sense?

I copied this over from the old repo which I was using until I realized it's no longer maintained. Sorry if this is a dup or if it was already fixed but I couldn't find that it was.

Activity

  1. added this to the v1.1.0 milestone on Nov 21, 2016
  2. modified the milestones: v1.1.0, v1.2.0 on Dec 21, 2016
  3. futpib commented on Dec 22, 2016

    @futpib
    Contributor

    I think an elegant way to support this would be to:

    1. Support datasets that call sync and async .search(...) callbacks more then once (I'm pretty sure all calls except the first one are currently ignored)
    2. Make a dataset class (constructor) that takes multiple datasets as arguments and represents their union (in kind of a set-theory sense). It's .search() method would just call all the "wrapped" dataset's search methods.

    Then one would be able to turn any number of datasets into one with just one "templates.empty" option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions