0

I was trying to access on of my dom elements using getElementByID, in componentDidMount Lifecycle hook in react. But it always gives null. I have below component architecture.

app

  • modeler(child1)
  • properties panel(child2)

Now I need to access input field within properties panel using getElementByID. This properties panel element is based on third party Camunda properties panel.

DTan13
  • 428
  • 6
  • 16
mr thor
  • 13
  • 5

1 Answers1

0

You should be using refs to access dom elements.

See this post for more information: How to access a DOM element in React? What is the equilvalent of document.getElementById() in React

Kevin C. Ferron
  • 151
  • 1
  • 8
  • I can't edit the properties panel html. I just need to use input field their #camunda-id and get that element somehow. – mr thor Jun 02 '21 at 05:07