Closed (fixed)
Project:
JSON:API Reference
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2022 at 17:01 UTC
Updated:
25 Jan 2026 at 21:08 UTC
Jump to comment: Most recent
Comments
Comment #3
prudloff commentedComment #4
eli-tAwesome stuff.
I've given this a test and it seems to do exactly what you want here, and I think this is a great addition to the module.
However there are some coding standard issues in TypedResourceObjectRadioWidget.php - if you can fix those then I'll gladly merge and issue a new release.
Would you be willing to add it to the new 2.0.x branch too? I envisage that to be where the bulk of additions are done in future.
Thanks so much for contributing!
Comment #5
eli-tActually, with respect to 2.0.x branch, there is some work in progress I need to complete #3311240: New 2.0.x branch for PHP 8.1 / Drupal 9/10 and merge in before we should put this in. So let's not worry about that yet.
Comment #6
eli-tI'm not going to add any more functionality to the 8.x-1.x branch so moving this issue to 2.0.x and creating a new branch/MR off that.
Comment #8
eli-tComment #9
eli-tComment #10
eli-tComment #11
arousseau commentedThis will need an update to reflect changes made in #3441052: Options using the same "search attribute"'s value are not all available if/when that lands.
Comment #12
eli-t@arousseau this now seems to work with the now merged change from #3441052, but needs the PHPCS issues raised by the CI to be fixed before it can be merged.
Comment #13
arousseau commentedThank you @eli-t
I think we can avoid adding a dedicated widget here !
I created #3474619: Use OptionsProviderInterface to allow options widgets usage to handle adding the
OptionsProviderInterfaceimplementation to the field type.Once it is merged, we'll only need to add the following to the existing
jsonapi_reference_field_widget_info_alter, to allow for the use of radio buttons :Comment #18
arousseau commentedI created a new branch + MR for this simple addition. It should be good to go!
Comment #19
eli-tComment #21
eli-t