Problem/Motivation

On the reports page, the 'Filter by Type' filter is not in alphabetical order.
Although paragraph labels are shown, the paragraphs are ordered by machine name.

Steps to reproduce

Go to /admin/reports/paragraphs-report
Use the 'Filter by Type' filter.
The issue is only apparent when paragraph labels are different to their machine names.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kionn created an issue. See original summary.

kionn’s picture

Here is a patch

chandansha’s picture

Status: Active » Needs work
StatusFileSize
new81.81 KB

I have try to apply patch but it will throw an error like "foreach() argument must be of type array|object, string given".
For reference i have attached Screen Shot.
Thanks!!

kionn’s picture

Hi Chandansha. Thanks for checking the patch.
The error you have looks to me like an issue with your composer.json file. Would you mind checking and trying again?
The patch applies fine for me.

kionn’s picture

Status: Needs work » Needs review
mortona2k’s picture

Status: Needs review » Reviewed & tested by the community

Simple code change sorts the paragraph names before creating the options.

Worked for me and did not throw the error mentioned in #3.

astonvictor made their first commit to this issue’s fork.

astonvictor’s picture

Version: 2.1.1 » 2.x-dev

astonvictor’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.