Skip to content

feat(list): add showItemCount prop to MultiList and SingleList - #2348

Open
tejash5489-lang wants to merge 2 commits into
appbaseio:nextfrom
tejash5489-lang:feat/list-item-count
Open

feat(list): add showItemCount prop to MultiList and SingleList#2348
tejash5489-lang wants to merge 2 commits into
appbaseio:nextfrom
tejash5489-lang:feat/list-item-count

Conversation

@tejash5489-lang

@tejash5489-lang tejash5489-lang commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • Adds a showItemCount boolean prop (default false) to MultiList and SingleList that renders the number of currently visible items next to the component title.
  • Count reflects listItems.length (buckets after transformData and the live showSearch filter), so it tracks what's actually on screen rather than the requested size.
  • Adds a TitleCount styled component in styles/Title.js, styled to match the existing muted per-item count treatment, with an innerClass.itemCount hook for custom styling.
  • Updates TypeScript typings (MultiList.d.ts, SingleList.d.ts) and propTypes/defaultProps.

Closes #1603

Test plan

  • Snapshot tests added in MultiList.test.js / SingleList.test.js for showItemCount true/false, snapshots committed
  • Full packages/web/src/components/list suite run locally: 67/67 passing, no regressions in other list components
  • CI test suite passes (pending maintainer approval to run workflows on this fork PR)
  • Manual check in Storybook/playground that the count renders next to the title and updates as search narrows the list

tejash5489-lang and others added 2 commits August 11, 2026 18:56
Renders the number of currently visible list items next to the
component title, addressing the request in issue appbaseio#1603 to surface
item counts (useful since the actual bucket count returned can be
lower than the configured `size`).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Verified locally: 67/67 tests pass across all list components.
Pre-existing snapshots only shift emotion's incremental class
numbering (new TitleCount styled component consumes a slot);
no structural changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Items Count next to MutliList Title

1 participant