primefaces / primefaces/primereact

MultiSelect: emptyMessage prop type

Open
#8,215 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Triage
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

This prop is typed as string only but should be a React.ReactNode (As the Dropdown prop with the same name)

Dropdown Prop Definition:
Image
MultiSelect Prop Definition:
Image
Reproducer

https://stackblitz.com/edit/primereact-multiselect-emptymessage?file=src%2FApp.tsx

System Information
System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 AMD Ryzen 7 7730U with Radeon Graphics
    Memory: 19.70 GB / 38.83 GB
  Binaries:
    Node: 20.18.0 - C:\nvm4w\nodejs\node.EXE
    npm: 10.9.3 - ~\...\node_modules\.bin\npm.CMD
  Browsers:
    Edge: Chromium (139.0.3405.86)
  npmPackages:
    primereact: 10.8.4 => 10.8.4 
    react: ^18.3.1 => 18.3.1
Steps to reproduce the behavior
  1. Try to set any ReactNode as "emptyMessage"
  2. Type error prompting (But ReactNode showing up correctly)
Expected behavior

Prop should accept a ReactNode as value

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the MultiSelect prop definition and compare its emptyMessage type with the Dropdown prop definition. Verify that a React.ReactNode is accepted, then run the linked StackBlitz reproducer or the relevant type checks to confirm the type error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.