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

adding event to know how many items were matched #98

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hd-diegocortez
Copy link

Solving issue here
#88

Copy link
Owner

@mattzollinhofer mattzollinhofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good, thanks!!

Would you mind looking at adding a test or two to capture that we're now returning the correct number of matched items?

@@ -33,6 +33,7 @@
@input="handleInput($event.target.value)"
@keydown.esc="handleEsc($event.target.value)"
@keyup="$emit('keyup', $event)"
@matched-items="$emit('matched-items', $event)"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's call this matched-items-count?

Suggested change
@matched-items="$emit('matched-items', $event)"
@matched-items-count="$emit('matched-items', $event)"

@mattzollinhofer
Copy link
Owner

I'm still interested in this PR. Any chance you're interested in adding a few tests?

@hd-diegocortez
Copy link
Author

Hi @mattzollinhofer,
I tried to run the project and it complains about a module not found, I'm using vue cli 4.4.1 and node 12.3.1. Is there something wrong?

@mattzollinhofer
Copy link
Owner

Hmm, I’m not sure. When I run vuepress dev docs it seems to work fine for me.

@KylSanAntonio
Copy link

Hi, may I know how can I get the matched items so I can display "No data found"?

@mattzollinhofer
Copy link
Owner

mattzollinhofer commented Apr 6, 2021

Hi @mattzollinhofer,
I tried to run the project and it complains about a module not found, I'm using vue cli 4.4.1 and node 12.3.1. Is there something wrong?

@hd-diegocortez: I just want to check in again. If you run vuepress dev docs does it still complain about a module not found?

Here's the steps to getting the project to work locally:

  1. Clone the repo: git clone [email protected]:mattzollinhofer/vue-typeahead-bootstrap.git
  2. yarn
  3. vuepress dev docs
  4. Open a browser and go to localhost:8080

Then to run tests it should just be npm run test:unit

I'm not sure if it matters or not, but I'm on node v15.3.0 and vue 4.2.2

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

Successfully merging this pull request may close these issues.

3 participants