Use this tag for questions about PrimeReact, a collection of UI Components for React.js. Questions tagged [primereact] should also be tagged [reactjs], but NOT [primefaces].
Questions tagged [primereact]
296 questions
1
vote
1 answer
PrimeReact dropdown options not accepting an array typescript
I am looking use PrimeReact Dropdown in NextJs app using typescript
When I select the list to get the dropdown options I get Error: Objects are not valid as a React child (found: object with keys {name, code})
The minimum code in a TSX file is
const…

Chris Hunter-Johnson
- 414
- 5
- 19
1
vote
0 answers
Cannot prevent event bubbling for Prime React Accordion
I have a problem with Prime React Accordion structure. Since I want it to be toggled only after clicking on the toggle icon, I tried to somehow prevent default event.
This is how my code looks like:

Patryk Łęczycki
- 61
- 5
1
vote
2 answers
Prime react dropdown default value not showing for API calls
Here is my code snippet
https://codesandbox.io/s/dropdown-primereact-gjcdm0?file=/src/demo/DropdownDemo.js
I am making an API call for my dropdown,
Expected: The currency codes should be visible on drop down once I select it and also the options…

Lakshmi Jayarama
- 13
- 3
1
vote
0 answers
Using Nested Fields with PrimeReact Datatable's Roweditor
I have been using the editable features of the datatable successfully for a while. However, I am now having issues editing fields where the field is nested.
I can view the value of the field just fine, but editing it isn’t working. With a dropdown,…

ANLM Evolution
- 11
- 1
1
vote
0 answers
Input has value but got undefined or empty string on submit using react hook form
I have nested form, one is on the parent and one is inside of a table component (using PrimeReact), and i have problem getting the value from the input inside of the table.
I got the data for the table from API, pass to every columns, put it inside…

beefrendang
- 11
- 1
1
vote
1 answer
How to read XML from body in Next.js API route?
I am using PrimeReact 8.5 fileUpload and Next.js 12.3
How do I get just the XML sent from PrimeRact?
I upload the file with

Chris Hunter-Johnson
- 414
- 5
- 19
1
vote
1 answer
Sorting not working in lazy loaded DataTable
I am attempting to add sorting functionality to a DataTable using primereact 8.6.1.
As written in the official documentation (https://www.primefaces.org/primereact/datatable) "In lazy mode, pagination, sorting and filtering must be used in…

Boris Layvant
- 151
- 13
1
vote
0 answers
PrimeReact Messages not work on useEffect (Comp Mount) ReactJS
I'm trying to trigger Messages on useEffect[]
but not working since the current ref is null, any idea ?
when I log the ref (pageNotification) on mount it shows null
I'm using react webpack TS
if I don't use chaining option will return…

rionalab
- 42
- 5
1
vote
1 answer
How to use Typescript with PrimeReact Steps component
I'm new with typescript use PrimeReact Steps component.
I wonder how to correct type items to pass type checking?
import React, { useState, useRef } from 'react';
import { Steps } from 'primereact/steps';
import { Toast } from…

Dmitriy_kzn
- 518
- 4
- 16
1
vote
1 answer
PrimeReact Dropdown options window scrolls aways from input field while scrolling the screen
I'm using Dropdown menu from PrimeReact library. I have just noticed that when I press on input field windows pops up and looks as it normally should, picture below.
But when I keep it open and scroll the screen window moves with the screen, which…

marcinb1986
- 708
- 1
- 11
- 30
1
vote
0 answers
onFilter() is not called when using Calendar element
My web app contains a table with three columns. One of this column shows timestamps and I want to filter them by lazy loading. However, the lazyParams are not set when I select a date in the Calendar. (the onFilter/useEffect hook will not be…

chko
- 13
- 5
1
vote
0 answers
PrimeReact - data table inline row editing
I am using PrimeReact Data table which works perfectly fine when I use built-in edit button for inline row editing. But I would like to customize the editor buttons e.g. I would like to display edit and delete button in same column which is…

Riy
- 479
- 1
- 8
- 16
1
vote
1 answer
Display different image based on data named "countries"
I'm trying to display a different country image based on each option (which is formed by the list of countries I have - named "countries") from the "selection" but I'm not sure how to do that. How to do that?
Here is how my code looks at the…

Daniel L
- 329
- 3
- 13
1
vote
1 answer
React(16.8.3) document.getElementById() returning null in componentDidMount
After updating Primereact to 8.3.0 document.getElementById() is returning null for div in primereact accordion created in return of jsx.
I was able to access the div returned by the primereact accordion in previous version of primereact 3.4.0.
React…

Aditya
- 11
- 1
1
vote
1 answer
PrimeReact upload with credentials
I need to pass the path of the selected file in the createReadStream (path_to_file.pdf) place. How am I supposed to do this, I have looked at the primefaces docs and I can't make anything meaningful
import {useRef} from "react";
import {Toast} from…

Paweł Ciszewski
- 21
- 2