Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiSelect emptyMessage prop results in error #5340

Closed
johanneshayry opened this issue Nov 17, 2023 · 5 comments · Fixed by #5403
Closed

MultiSelect emptyMessage prop results in error #5340

johanneshayry opened this issue Nov 17, 2023 · 5 comments · Fixed by #5403
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@johanneshayry
Copy link

Describe the bug

It seems like the emptyMessage prop hinted by the documentation does not work.

React does not recognize the 'emptyMessage' prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase 'emptymessage' instead. If you accidentally passed it from a parent component, remove it from the DOM element.

Reproducer

No response

PrimeReact version

10.0.9

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome

Steps to reproduce the behavior

  const [value, setValue] = useState("a");
  const options = [
    { value: "a", label: "A" },
    { value: "b", label: "B" },
  ];
  <MultiSelect emptyMessage="-" value={value} options={options} onChange={(e) => setValue(e.value)} />;

Expected behavior

No response

@johanneshayry johanneshayry added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 17, 2023
@melloware
Copy link
Member

Its working for me? https://stackblitz.com/edit/react-9h4sys?file=src%2FApp.js I don't see any errors in the log?

@melloware melloware added Status: Needs Reproducer Issue needs a runnable reproducer and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 17, 2023
Copy link

Please fork the CodeSandbox project or Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.

@Chuazz
Copy link

Chuazz commented Nov 26, 2023

Its working for me? https://stackblitz.com/edit/react-9h4sys?file=src%2FApp.js I don't see any errors in the log?

oh, i see this error in your demo and i have a same issue with him, i'm using nextjs 14.0.3, primereact 10.1.1
this is your demo
image

and this is my web and code i do
image
image

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Reproducer Issue needs a runnable reproducer labels Nov 26, 2023
@melloware melloware self-assigned this Nov 26, 2023
@melloware melloware added this to the 10.2.0 milestone Nov 26, 2023
melloware added a commit to melloware/primereact that referenced this issue Nov 26, 2023
@melloware
Copy link
Member

@Chuazz that helps! Found and fixed for next version.

@Chuazz
Copy link

Chuazz commented Nov 26, 2023

@Chuazz that helps! Found and fixed for next version.

niceeeee

melloware added a commit to melloware/primereact that referenced this issue Jan 9, 2024
melloware added a commit that referenced this issue Jan 9, 2024
* Fix #5384: TreeTable support hidden columns

* fix:#5553:TreeTable: need to be converted to data- lookups instead of className lookups

* TreeTable

* Fix #5597: TreeTable body align

* Fix #5393: Tree propagate icons to leaf nodes

* Fix #5233: Cell editor ColumnEditorOptions param fix

* Fix #5398: Slider with min value rendered incorrectly

* Fix #5340: MutliSelect emptyMessage don't add to DOM

* Fix #4190: Chip aria fixes

* Fix #5414: p-disabled for svg icons

* Fix #5424: CascadeSelect use data instead of CSS selector

* Fix #5425: CascadeSelect fix for StrictMode

* Fix #5440: InputText only print className once
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants