Skip to content

Auto refresh select width when the attribute is auto#684

Merged
wenzhixin merged 1 commit into
wenzhixin:developfrom
Domingla:feature/auto-width
Apr 17, 2026
Merged

Auto refresh select width when the attribute is auto#684
wenzhixin merged 1 commit into
wenzhixin:developfrom
Domingla:feature/auto-width

Conversation

@Domingla

Copy link
Copy Markdown

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for width: 'auto' so the select control can automatically resize based on the displayed selected text, and updates the examples/docs to demonstrate the new behavior.

Changes:

  • Skip fixed-width sizing during initView() when options.width === 'auto'.
  • Dynamically measure selected text and set the component width during update() when width: 'auto' is used.
  • Update Vue + static site examples and the examples index description to document and showcase the new option.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/MultipleSelect.js Implements width: 'auto' sizing behavior by measuring text and updating parent width.
vue-examples/src/examples/CustomDropdownWidth.vue Adds a Vue example demonstrating width="auto".
vue-examples/src/assets/MS.json Updates the example description to mention width: 'auto'.
site/website/static/templates/custom-dropdown-width.html Updates docs/example page and adds a second demo select configured with width: 'auto'.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/MultipleSelect.js Outdated
Comment thread src/MultipleSelect.js Outdated
Comment thread src/MultipleSelect.js Outdated
Comment thread vue-examples/src/assets/MS.json
Comment thread site/website/static/templates/custom-dropdown-width.html
@Domingla Domingla force-pushed the feature/auto-width branch from 40737a1 to cdd2999 Compare April 16, 2026 10:00
Comment thread src/MultipleSelect.js Outdated
Comment thread src/MultipleSelect.js Outdated
@Domingla Domingla force-pushed the feature/auto-width branch from cdd2999 to d3483f7 Compare April 17, 2026 02:29
@wenzhixin wenzhixin merged commit 989b4b1 into wenzhixin:develop Apr 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants