Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What: Added prop to set custom class for highlighted item. if prop is set then it will override default highlighted class.
Why: Wanted it as a feature. Ability to set custom class as highlighted class. could have used "componentAttrPrefix" but there are cases, like in module based vue styles were class names have random suffix. and cannot be predetermined, but need to be passed dynamically. Will not break existing functionality.
How: Added new prop 'component-attr-class-autosuggest-item-highlight'. During section rendering, this prop is transformed to highlightClass and passed to sectionConfig, since highlight class logic was hardcoded in section. Did not use section config to pass this prop because even though internally it is being passed through section config for design reasons, but for the user it is a global config. Please ignore formatting changes.. there are only 2 logical changes. one is function 'computedSections' in Autocomplete.vue and one is render function in the file DefaultSection.js.
Checklist:
I had some issue regarding the code in function 'setCurrentIndex'. I've added comments. please inform if i'm mistaken. Failing test case was working through storybook but failing in test case, so i'm a bit confused as to why.