Problem/Motivation

The core entity reference autocomplete widget has "Size of textfield" setting which allows you to control the size of the widget on the form.

Proposed resolution

Implement "Size of textfield" setting for Select2 widget as well.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

mbovan created an issue. See original summary.

chr.fritsch’s picture

This is not so easy I guess. The select2 element has not a size property. We could use select2s width property, but that only accepts css width values.
So I don't know how to map a input size value to a CSS width value.

chr.fritsch’s picture

Status: Active » Needs review

Ok, here is a PR. So when we have the choice to put in %, px or em, why shouldn't we use it.

https://github.com/thunder/select2/pull/40

chr.fritsch’s picture

Status: Needs review » Reviewed & tested by the community

Adding review credits

  • chr.fritsch authored 0b6e655 on 8.x-1.x
    Issue #3003459 by chr.fritsch, daniel.bosen: Implement size widget...
chr.fritsch’s picture

Status: Reviewed & tested by the community » Fixed

Committed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.