[6.x]: Element index View menu: sort direction buttons only update after the table has loaded

Open Beginner friendly
#20,203 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
64/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
frontend

Research direction

Start by inspecting the element index View menu and the sort-direction controls involved in loading new rows. Reproduce the delay with network throttling, then verify that the selected button becomes active immediately when clicked, before the rows finish loading.

Written by the indexing model from the issue text.

Description

bug repo:cms
What happened?
Steps to reproduce
  1. Open an element index and open View.
  2. Press the other sort direction button (asc/desc). Throttling the network (e.g. Slow 4G) makes it easy to see.
Expected behavior

The pressed button shows as active as soon as it's clicked.

Actual behavior

The previous direction stays active until the new rows have loaded. On Slow 4G it took about 3.7 seconds after the request was sent.

Craft CMS version

6.x-dev @ 420552c31b

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions
Dominant language
PHP
Stars
3.6k
Forks
712
Avg merge
12h 40m
Merged PRs (30d)
344

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from craftcms/cms

All issues in craftcms/cms

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.