material-table icon indicating copy to clipboard operation
material-table copied to clipboard

onClick prop when 'add' is clicked

Open triusis92 opened this issue 7 years ago • 5 comments

Hi,

I'm using the onRowAdd prop when adding a row to the table. I was wondering if there is something like onClick prop when when clicking the 'add' button initially as in not after inputting values and clicking save but just before the options are presented to do so?

I tried using onClick but it has no effect.

Code snippet below of what I'm trying to achieve: editable={{ onClick: ()=> {console.log('clicked')}, // nothing happens onRowAdd: newData =>{ new Promise((resolve, reject) => { setTimeout(() => { etc...

UPDATE:

After digging through open issues and visiting these links: https://github.com/mbrn/material-table/issues/1131 https://github.com/mbrn/material-table/pull/1184 https://stackoverflow.com/questions/58144937/check-if-a-material-table-row-is-still-in-edit-mode

Could not find a solution that I initially wanted. Found a workaround thats specific to my application though. Hopefully a solution for this gets released soon.

triusis92 avatar Nov 24 '19 13:11 triusis92

Any update on this? :)

rommelmamedov avatar Dec 19 '19 09:12 rommelmamedov

+1

govinddk4444 avatar Jan 10 '20 03:01 govinddk4444

+1

Jsalvat avatar Jan 14 '20 12:01 Jsalvat

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Jun 30 '20 22:06 stale[bot]

Ah crap I also want to know this one since I want the new row that is generated by Add button appear on the top.

v1v2v3vv55 avatar Feb 12 '21 17:02 v1v2v3vv55