Options using the same "search attribute"'s value are not all available

Created on 15 April 2024, 7 months ago
Updated 18 September 2024, 2 months ago

Problem/Motivation

I think I found a limitation in the way the module constructs the results array, used as options by the field.
If two or more results use the same value for the attribute used for searching, the most recent one will be the only available option.

For example, let's say I have two distinct taxonomy terms named foo, the only one to appear as an option inside the widget will be the one that came last in the search results.

Steps to reproduce

  1. Create/Edit a taxonomy vocabulary
  2. Add two terms with the same name
  3. Test the widget

Proposed resolution

What workaround would be best ? Maybe using the id of each result as a key in Drupal\jsonapi_reference\JsonApiClient::search() method ?

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇫🇷France arousseau

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024