carbon-design-system / carbon-components-vue

Vue implementation of the Carbon Design System
http://vue.carbondesignsystem.com
Apache License 2.0
607 stars 178 forks source link

cv-dropdown: Inline dropdown arrow icon missing #584

Closed mrsideshowjack closed 4 years ago

mrsideshowjack commented 4 years ago

Detailed description

Describe in detail the issue you're having.

Given the dropdown is set to inline After a option has been chosen from the dropdown, the caret icon disappears

Is this a feature request (new component, new icon), a bug, or a general issue?

Bug

Is this issue related to a specific component?

cv-dropdown

What did you expect to happen? What happened instead? What would you like to see changed?

The caret icon to the left of the text is expected to remain after a selection has been made, see https://www.carbondesignsystem.com/components/dropdown/code

What browser are you working in?

Chrome Version 77.0.3865.90

What version of the Carbon Design System are you using?

Latest / Storybook

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

PartnerWorld/none

Steps to reproduce the issue

  1. Open cv-dropdown in storybook http://vue.carbondesignsystem.com/?path=/story/components-cvdropdown--default
  2. Enable the inline knob
  3. Select an option in the dropdown

Additional information

Screencap:

Screenshot 2019-10-08 at 15 51 33
mrsideshowjack commented 4 years ago

I think it's because when the internalValue is set it updates the innerHTML of the ref valueContent, when it's inline the valueContent ref has the icon as a child so it gets overwritten.

I can submit a PR to fix