Provide option label as computed field property

Created on 3 October 2020, about 4 years ago
Updated 1 May 2024, 7 months ago

Problem/Motivation

Currently, only the key of a List (Text) (or List (Integer) or List (Float)) field is available as a field property. This issue seeks to make an option's label available, as well, as a computed property.

Proposed resolution

Look at Drupal\text\TextProcessed as an example.

Create a 'option_label' field property for the three field types provided by the Options module. Because of by-design limitation of JSON API, the property will need to be marked as 'internal', which means it won't be available to REST, JSON API, etc.

Remaining tasks

  • Review.

User interface changes

None.

API changes

For 'list_string', 'list_integer', and 'list_float', field types a new 'label' property will be added.

Data model changes

For 'list_string', 'list_integer', and 'list_float', field types a new 'label' property will be added.

Release notes snippet

TBD

Feature request
Status

Needs work

Version

11.0 🔥

Component
Options 

Last updated 9 days ago

No maintainer
Created by

🇺🇸United States Chris Burge

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024