'Modal always re-rendering when typing in input for React-Bootstrap-Table2

I'm trying to implement an 'Edit Category' modal that can edit the current selected row in React-Bootstrap-Table2.

However, when I tried to type in Category Description, it always re-renders the modal and I can only type 1 letter at a time.

Also, how can I set the value of the state for both the inputs based on the selected row's info because currently if I set the value of Category Name with modalInfo.categoryName, then the input cannot be edited.

Codesandbox link



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source