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
0
votes
1 answer
Need help by populating a PrimeReact Tree
I'm trying to populate a PrimeReact Tree with data from sqlite3 database, but it doesnt work.
Here is my SQL-Query:
select 'prj:'||p.id as key,p.name as label,(
select json_group_array(json_object('key',key,'label',label))
from(
select…

Ramirez
- 41
- 1
- 1
- 8
0
votes
0 answers
dynamic data is not iterable
Please refer to the sandbox link here
I'm using my own dynamically generated data and hence using the following in my code:
const onRowEditComplete1 = (e) => {
let _dynamicData = [...dynamicData];
let { newData, index } = e;
_dynamicData[index] =…

Tan
- 1,433
- 5
- 27
- 47
0
votes
0 answers
How to get the all resizable columns width from PrimeReact Datatable
I'm using primereact version "^8.0.0" in my react project. and using DataTable in functional components.
this is my datatable structure

Yuvraj Mule
- 452
- 4
- 12
0
votes
1 answer
PrimeReact DataTable cell editing no working correctly with async calls
am facing this problem when i try to update a cell in the data table , the value is not updated imedietly (visual update) , the new value is shown when i click on another cell , here is part of updating code:
const onCellEditComplete = async (e) =>…

MeriemMat
- 21
- 1
0
votes
1 answer
Primeicons not working on Server with no internet
I am trying to use primeicons in my react app and icons are getting loaded successfully on local environment, however while deployment on server, where there is no internet, icons are not getting loaded.
import…

NKapoor
- 63
- 7
0
votes
1 answer
primereact functionality of adding a new row in DataTable
is there any way of adding a new row on button click in datatable in primereact like in primefaces.
i didn't found any functionality in primereact in documentation however there is option available in…

Shaheer S
- 1
- 1
0
votes
0 answers
Convert html with applied styles to a string without changes in styles
I want to convert this part of code (span tag with styles) into a string and the styles should be applied to the string, so that when I render the string the CSS is activated.
let text =

ObiGonz
- 33
- 4
0
votes
1 answer
PrimeReact currentPageReportTemplate styling
How can I add styles to the property currentPageReportTemplate from this component:
public render(): React.ReactElement {
const template = {
layout: 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink…

ObiGonz
- 33
- 4
0
votes
1 answer
how to modify and make labels box width fixed without changes of chart.js
i have 2 Doughnut that needs to be aligned 1 avobe another
you can see in the image below:
enter image description here
the Doughnuts are not aligned as you can see beacuse the labels length is not equal.
i have played with plugins.legend.labels…

אור ברמן
- 13
- 2
0
votes
0 answers
React reseting states
I have a component that renders a Datatable from primereact. I am loading the data from the server, and I am setting an offset state in the main component to manage the pagination. Everything is good, but when I try to change the page in the…

Michal Ružička Ružička
- 1,045
- 8
- 25
0
votes
0 answers
Menu Item is not expanding default after applying property expanded to true in primereact diamond template
I am working on diamond-react theme of primereact and I have customized the menu.
I want to expand the menu item default or conditionally. I tried with below expanded property as per documentation but it didn't worked for me:
{
label: "Email",…

Vaibhav Gidde
- 740
- 7
- 13
0
votes
1 answer
Chart js how to remove numbers on circles of polar chart
i was using Prime react polar chart which is built on chartjs version 3.0
i was unable to remove the numbers on polar chart
my options variable is
const config = {
plugins: {
legend: {
position: "top",
align: "center",
…

charan p.v
- 41
- 5
0
votes
2 answers
Access the outer items of an object in a function of that object
I've used Dock of PrimeReact.
According to its document, For model we should pass its dockItems.
So I defined options like this:
I have an array of objects. Inside it I have buttons, I want to check…

Fateme Mirjalili
- 762
- 7
- 16
0
votes
1 answer
How to customize toolbar in primereact?
I am new to primereact. I wanted a custom toolbar like in material-ui.
But primereact's toolbar isn't accepting children. Any way to fix?
App Header
user14872626
0
votes
1 answer
Primereact tree context menu not hiding after an action
I'm using Primereact's tree along with context menu. After performing an action (a click event on one of the menu items), context menu is not hiding. If I click anywhere on the screen the context menu hides. Here is the code. I'm following the same…

sb29595
- 25
- 5