Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an optional format string for [Dropdown] #330

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nitz
Copy link

@nitz nitz commented Jul 19, 2022

Didn't realize that renaming a branch would auto-close the previous PR. 馃槄

A continuation of #286 after feedback from @rhys-vdw;

Instead of allowing the user to provide individual prefixes or suffixes to the way values are displayed by the [Dropdown] attribute, instead this allows them to provide a standard format string that can manipulate the values as they see fit.

This allows for more custom display for values, with minimal in-class additions by the end user:

E.g.:
image

Results in:

image

and

image

nitz added 2 commits June 14, 2022 11:39
This just optionally modifies the text being drawn in the dropdown, so that the user can easily prefix or suffix options with "decoration".
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.

None yet

1 participant