Questions tagged [primereact]

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].

296 questions
2
votes
1 answer

TypeError: Class extends value # is not a constructor or null in react js
I am trying to over ride some function of a prime react button component but i am getting this error while extending prime react button component class. Here is my code: import { Button } from "primereact/button"; class BtnBox extends Button { …
2
votes
3 answers

Overriding PrimeReact Styling

I am trying to find the best solution for overriding the default 'Nova' theme used for Prime React. I am aware they have a theme designer available to purchase however I would ideally like to not use that. Previously I was having a scss file with…
monkeys73
  • 171
  • 1
  • 3
  • 13
2
votes
0 answers

Prime React Calender Positioning Issue

Using primereact calendar for both date & Time selection. code
K Guru
  • 1,292
  • 2
  • 17
  • 36
2
votes
4 answers

Dynamically generate list from json data in react

I am using primereact to generate table and i wanted to implement ColToggle Here is the link https://www.primefaces.org/primereact/#/datatable/coltoggle. Since I am dynamically generating columns from JSON Server , I want to dynamically generate…
Anish Arya
  • 518
  • 1
  • 7
  • 24
2
votes
1 answer

Can't go to a specific date on Full Calendar

I use the Full Calendar of primereact, but I need to select a specific year and month. I have separate date picker for this purpose. But when I try to change date with gotoDate method of Full Calendar, there is an error 'Uncaught TypeError:…
2
votes
2 answers

Not able to set focus on the Dropdown component in Primereact

I am trying to set focus on "Dropdown" component of the primereact but focus is not coming to the "Dropdown" component. I have used autoFocus property as given in https://www.primefaces.org/primereact/#/dropdown . Then I tried to use react ref to…
Gobinda
  • 79
  • 7
2
votes
0 answers

Unable to import PrimeReact style files on Next.js project

I'm trying to use PrimeReact components on a Next.js project but I'm getting an error when I try to import the core css styles as shows in their documentation (https://www.primefaces.org/primereact/#/setup), I have used these components with a…
Felix Avelar
  • 161
  • 1
  • 1
  • 7
2
votes
2 answers

Get HTMLInputElement from ref to PrimeReact's InputText

I am trying to use a ref to get to the underlying input element of an InputText component. I used this.textFieldRef = React.createRef() to set up the ref, and then the attribute ref={this.textFieldRef} to hook it up. Yet in the componentDidMount I…
EFC
  • 1,890
  • 18
  • 39
2
votes
1 answer

What is the best way to include css files for Prime React components when using Parceljs?

I am using Parceljs (https://github.com/parcel-bundler/parcel) and React in my application. I have decided to use Prime React components as they seam pretty solid and well built. I have installed Prime React with npm successfully and of course all…
Caslav Sabani
  • 421
  • 6
  • 20
2
votes
1 answer

JavaScript Incremental Array React

Hi This is my json value constructor() { super(); this.exportpdf = this.exportpdf.bind(this); this.state = { sales: [ { customStudentId: "2064517", studentRoll: 26, studentName: "Md. Faiaz Jakir ", …
Aarif Hasan
  • 57
  • 1
  • 8
1
vote
1 answer

Primereact InputNumber ref

Am I just blind and don't see it anywhere but is it not possible to have a ref={name} on a InputNumber element? wanted to…
1
vote
1 answer

PrimeReact Datatable cannot use onCellClick while having a checkbox column

Hello I have an issue with PrimeReact were I cannot use onCellClick={() => console.log("clicked")} OR onCellSelect={() => console.log("select")} while having a checkbox column
Skry
  • 11
  • 1
1
vote
1 answer

How to export all data from a primereact lazy loaded table?

I'd like export all data from a lazy loaded PrimeReact DataTable to CSV file. I can export one page to file but not all data from all page. const dt = useRef(null); const exportCSV = (selectionOnly: boolean) => { dt.current.exportCSV({…
Papp Zoltán
  • 131
  • 7
1
vote
1 answer

primereact file upload uploadHandler change status of uplaod

I'm using Primereact's file upload component with customUpload prop and Uploadhandler callback. I want to change the status of the uploaded file when my uploadHandler function finishes executing.
Ibra
  • 912
  • 1
  • 12
  • 31
1
vote
0 answers

Virtual Scroll does not render items in tests

While I have had no problems testing other primereact components the VirtualScroller never renders any items. The test below render the wrapper HTML, including a DIV with the class 'p-virtualscroller-content', but never the content. The same code…
David Churchland
  • 292
  • 2
  • 11
1 2
3
19 20