Ask Your Question
1

Can a default value be established for cells when a new row is added in React Material Table?

asked 2021-10-05 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-10-26 00:00:00 +0000

nofretete gravatar image

Yes, a default value can be established for cells when a new row is added in React Material Table. This can be accomplished by setting the default value in the initial state of the parent component and passing it down to the child component as a prop. In the child component, the default value can be used in the table cells by checking if the value exists, and rendering it if it does, otherwise render the default value. Alternatively, the table cell component can be configured to include a default value property that is used when a new row is added.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-10-05 11:00:00 +0000

Seen: 9 times

Last updated: Oct 26 '21