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

Add props for list & list item className #90

Closed
wants to merge 1 commit into from

Conversation

farooqaaa
Copy link
Contributor

What: Class name props for list & list item

Why: I used bootstrap with autosuggest and I was unable to set classes for the suggestions ul and li elements. I can now add the bootstrap class names to those elements.

How: Added listClassName and listItemClassName to section configs

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

@codecov-io
Copy link

Codecov Report

Merging #90 into master will increase coverage by 0.22%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
+ Coverage   80.11%   80.33%   +0.22%     
==========================================
  Files           1        1              
  Lines         176      178       +2     
  Branches       53       55       +2     
==========================================
+ Hits          141      143       +2     
  Misses         12       12              
  Partials       23       23
Impacted Files Coverage Δ
src/Autosuggest.vue 80.33% <100%> (+0.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45fd849...5dbd697. Read the comment docs.

@@ -66,7 +67,8 @@ const DefaultSection = {
class: {
"autosuggest__results_item-highlighted":
this.getItemIndex(key) == this.currentIndex,
autosuggest__results_item: true
autosuggest__results_item: true,
[this.section.listItemClassName]: this.section.listItemClassName
Copy link
Owner

Choose a reason for hiding this comment

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

I don't mind adding this, but instead of restricting it to class, we should instead bind any attributes using v-bind which can accept an object.

@darrenjennings
Copy link
Owner

Closing due to inactivity.

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