Skip to content

Select collapses when no placeholder is provided #148

Description

@certainlyakey

What happened?

With an empty string as a placeholder prop value, cvi-ng-select's width collapses.

Since no placeholder value is provided by default and placeholder is not a required prop, then the bug can be reproduced by simply setting the minimally required amount of props to the component, eg.

<cvi-ng-select [items]="items" labelId="select-label-id" htmlId="select-id"></cvi-ng-select>

This seems to be not an Angular issue however, but rather a styling issue.

Reproduction steps

  1. Go to https://e-gov.github.io/cvi/?path=/story/angular-form-select--default
  2. Clear the placeholder control
  3. Remove the pre-set container width via Dev Tools
  4. Observed: the component collapses becoming too small
  5. Expected: the component retains some reasonable width by default

Screenshot

image

Package

Styles

Version

1.12.0

Reproduction URL

https://e-gov.github.io/cvi/?path=/story/angular-form-select--default

Browser

No response

Browser version

No response

Extra details about your environment

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions