Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Search using Key Words not working #1563

Closed
fredmaccaferri opened this issue Nov 25, 2016 · 4 comments
Closed

Live Search using Key Words not working #1563

fredmaccaferri opened this issue Nov 25, 2016 · 4 comments
Labels

Comments

@fredmaccaferri
Copy link

Live Search using Key Words it's not working

I've make a test with mac osx 10.11.6 with my macbook pro.
tested with safari 10.00.1 and chrome 54.0.2840.98 (64-bit).

TEST ON ONLINE EXAMPLE

  1. Go to https://silviomoreto.github.io/bootstrap-select/examples/#key-words
  2. Test the key words ketchup (as wrote in test)
  3. Nothings seems to work

screenshot 2016-11-25 17 16 15

TEST ON LOCAL EXAMPLE

  1. download the example code
  2. search an example with data-live-search="true"
  3. insert some key words (es. data-tokens="ketchup mustard")
  4. Nothings seems to work
@caseyjhol
Copy link
Member

Looks like this was broken in #1516.

@JohnnyDeeee
Copy link

JohnnyDeeee commented Jan 4, 2017

Has this been pushed through, because i still cant get it to work on the Online Examples page and also on JSFiddle Test using the latest version (1.12.1) ...

@caseyjhol
Copy link
Member

v1.12.2 has officially been released.

@tomczek
Copy link

tomczek commented Sep 17, 2018

I had a similar problem. My search-result for liveSearchStyle "startsWith" was always empty for each search-value. After a while I've figured out, that this was an mapping issue. This is how it worked for me:

<abp-select
	picker-options.bind="{ liveSearch: true, dropupAuto: false, noneSelectedText: '', liveSearchStyle: 'startsWith' }"
	collection.bind="items"
	selected-item.bind="selectedItem"
	data-mapping-structure.bind="{ option: 'standardDisplayText', content: 'standardDisplayText' }"
	object-key="key">
</abp-select>

export interface IItem {
    key: string;
    value: string;
    displayText: string;
}

public items: IItem[];
public selectedItem: IItem;

items = [
	{ key: '121', value: 'hello', displayText: '121 - hello' },
	{ key: '112', value: 'world', displayText: '112 - world' },
];

search for: "12"
result: "121 - hello"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants