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
React Final Form Dynamic Dropdown with Prime React
I am trying to initialize a dynamic list of User with a DropDown from the PrimeReact library. I am able to load it, even though I am not sure if it is the right way. I am able to select a User, but unable to pass it down to the form. I am also not…

befabry
- 672
- 5
- 13
0
votes
1 answer
MultiSelect does not update value when value state changes (PrimeReact UI)
https://www.primefaces.org/primereact/showcase/#/datatable
https://www.primefaces.org/primereact/showcase/#/multiselect
I am using the PrimeReact library to create and customize a Data Table.
My table is dynamic and will build itself based on the…

CashbyCoder
- 61
- 1
- 8
0
votes
1 answer
PrimeReact Select Item is empty after loading data from API
My Functional component is as follows:
const Scratch = () => {
const [isLoaded, setIsLoaded] = useState(false);
const colorSelectItems=[];
const [selectedColor, setSelectedColor] = useState("fffff");
useEffect(() => {
fetch(
…

Harihara_K
- 174
- 16
0
votes
1 answer
How to use a HTML portion of a react.js file to another react.js file
I am trying to use the content of a separate react.js file to another react.js file. The js file contains a drop down & the drop down i want to show on the basis of a condition. Below is the js file which contains the drop down
const…

Mandrek
- 1,159
- 6
- 25
- 55
0
votes
1 answer
How to autoadjust the column in primereact Datatable
I am using a prime react datatable to populate date. I want to auto adjust the values with the column in the table. I have tried using some css and dattable properties , but it is not working for me . Here is what i have done so far
const…

Mandrek
- 1,159
- 6
- 25
- 55
0
votes
3 answers
change from Classcomponent to functional component
i have a little question, i having use PrimeReact to develop my stuff but sometimes is quite annoying change from classcomponent to functional component, so i want to change this component to funtional, someone can help me?
import React, {…

David_roman
- 73
- 9
0
votes
1 answer
Primereact: Warning: Encountered two children with the same key,
I am using primereact dropdown component https://primefaces.org/primereact/showcase/#/dropdown
But getting this warning:-
react_devtools_backend.js:2450 Warning: Encountered two children with the same key. Keys should be unique so that components…

Mahi
- 3,748
- 4
- 35
- 70
0
votes
2 answers
How to iterate through a list of objects in reactjs using map function?
I am trying to iterate through an array of objects in reactjs but facing issue. The array basically consists of objects where each object is a row in a table.
Example -
A table like this
| A | B | C |
| 1 | 2 | 3 |
| 4 | 5 | 6 |
would be…

Ashish Mysterio
- 177
- 1
- 5
- 13
0
votes
1 answer
Insert a div that does not exist in html form sass/css
I am working on a React Component in which I have a DatePicker (Calendar component from PrimeReact).
I want to add an arrow on top of the datepicker that pops up. Like in the image below
Below is a snippet in my form :

Praveen Dass
- 586
- 1
- 3
- 13
0
votes
1 answer
Trigger completeMethod in PrimeReact Autocomplete on callback
I am using primereact's Autocomplete component. The challenge is that I don't want to set the options array to the state when the component loads; but instead I fire an api call when the user has typed in the first 3 letters, and then set the…

Praveen Dass
- 586
- 1
- 3
- 13
0
votes
1 answer
InputText component results in TypeError: e.target is null when typing into text box (PrimeReact library, using arrow function)
I'm using PrimeReact and I have a datatable of persons:
When selecting any row, a sub panel is shown having dropdowns, check boxes and text inputs:
Text input code:

Kawu
- 13,647
- 34
- 123
- 195
0
votes
3 answers
React event handler doesn't assign mode as expected, evaluates as null
I have a page that looks like this:
When clicking the row's edit button, the component is supposed to set the selected entity to that row and put itself into "EDIT" mode.
However, when displaying a box in the upper right (component called toast…

Kawu
- 13,647
- 34
- 123
- 195
0
votes
0 answers
Modifying a primereact module
I'm trying to use "autocomplete" module of primereact, however it's missing a little thing that I want to add. But if I make my modifications in node_modules, it just reverts back to original whenever I update the package. Is there any way to make…

dokkan1
- 3
- 1
0
votes
1 answer
React / PrimeReact app not rendering datatable content from web service using JSON
Beware, I'm all new to ReactJS and PrimeReact. I'm trying to build a page that shows a list of persons, data drawn from another, Java backend server.
First off, here's the JSON data:
Here's my index.js:
import React from 'react';
import ReactDOM…

Kawu
- 13,647
- 34
- 123
- 195
0
votes
0 answers
Prime React Datatable nested JSON
I would like to get some clarification on whether or not I can work with a nested JSON dataset in this format with the primereact datatable.
"collections": [
{
"name": "CollectionOne",
"categories": [
{
"code": "001",
"text":…

James Gillies
- 23
- 4