Update TS tabs on primereact components showcase

UI Components for React
Post Reply
ricardo.tozati
Posts: 1
Joined: 08 Nov 2021, 17:45

16 Nov 2021, 15:59

Hi,

i just checked the TS tab on the primereact components showcase needs to be updated with types on the usage of variables.

For example:

https://www.primefaces.org/primereact/s ... /accordion

Code: Select all

export const AccordionDemo = () => {
    const [activeIndex, setActiveIndex] = useState(null);

    const onClick = (itemIndex) => {
        let _activeIndex = activeIndex ? [...activeIndex] : [];
It is missing at least 'any' added like the below:

Code: Select all

export const IntegrationWizard = () => {

    const [activeIndex, setActiveIndex] = useState<any>(null);

    const onClick = (itemIndex: any) => {

        let _activeIndex: any[] = activeIndex ? [...activeIndex] : [];
I bought the Ultima template and while getting examples from the showcase to create new elements, I needed to check for issues instead of using the examples directly.

Thanks,
Ricardo

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

19 Nov 2021, 03:02

Yep its on their backlog. All of the TS examples are not really TS they are copies of the "Hooks" tab.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests