select2-bootstrap4-theme icon indicating copy to clipboard operation
select2-bootstrap4-theme copied to clipboard

Invalid layout on multiple select and input-group

Open laurentmuller opened this issue 4 years ago • 3 comments

When using select2 with multi select, input-group and the total length of items is smaller than the form group, the prepend and append groups are aligned correctly:

layout_valid

But if more items are added, the prepend and append groups move to a new line:

layout_invalid

laurentmuller avatar Aug 17 '21 18:08 laurentmuller

I've added this SCSS as a workaround and a flex-nowrap with input-group class.

.input-group > .select2-container--bootstrap4 {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;

  .select2-selection--single,
  .select2-selection--multiple {
    height: 100%;
    line-height: inherit;
    padding: 0.5rem 1rem;

    .select2-selection__choice {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 100%;
    }
  }
}

rafael-perini avatar Sep 06 '21 13:09 rafael-perini

@rafael-perini it is in the final version???

wnunezc avatar May 16 '22 14:05 wnunezc

I don't have access to the project I was working on @arcanisgk, but I don't think it is anymore. Yet, I'm not sure if the issue was fixed.

rafael-perini avatar May 16 '22 19:05 rafael-perini