Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

72
Views
Need to rerender component on array prop update

I have parent component ComponentTableCustom which is drawing tables according to given props. Also I have prop columnsNaryad which is array of objects. As a child CN has search field with button. How can I redraw CTC on this button click and get info from field?

What I have now:

export const columnsNaryad = [
    {
        title: 'Title',
        dataIndex: 'naryad_NomerNaryada',
        sorter: true,
        filter: '',
        children: [
            {
                title: (
                    <Input.Search
                        style={{ width: "100%" }}
                        onSearch={nameSearch => {
                            console.log(nameSearch)
                            console.log(columnsNaryad)
                            columnsNaryad[0].filter = nameSearch
                        }}
                    />
                ),
                dataIndex: 'naryad_NomerNaryada',
                width: 130,
            }
        ]
    },
    {...}]

And App:

<Route path="/naryad">
                <ComponentTableCustom
                  dataSource={naryad}
                  setDataSource={setDataSourceEdinicy}
                  columns={columnsNaryad}
                  page={"naryad"}
                  rowSelection
                />
</Route>

As a variant there is use-deep-compare-effect but that is not the best choise I think.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!