When match limit is set to 0 no results are returned on entity reference fields

Created on 21 May 2024, 4 months ago
Updated 3 June 2024, 3 months ago

Problem/Motivation

When using Select2 on an entity reference field, if you set the match limit to 0 no results are returned.

Steps to reproduce

Use Select2 on an entity reference field and enable autocomplete.
Set the number of results to 0.
Try to look up a known entity and no results will appear.

Proposed resolution

Only use the array_slice on matches if the match limit doesn't equal 0 in EntityAutoCompleteMatcher.php

Remaining tasks

n/a

User interface changes

n/a

API changes

n/a

Data model changes

n/a

-----------
Edit: Second patch fixes the results only returning 1 item when match limit is set to 0.

πŸ› Bug report
Status

Closed: duplicate

Version

1.13

Component

Field widgets

Created by

πŸ‡¬πŸ‡§United Kingdom remotebox

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

Comments & Activities

Production build 0.71.5 2024