-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes are made to insert a new row into a specific location of grid by passing rowIndex parameter to addNewRow(ADD_NEW_ROW) action. #129
Conversation
passing rowIndex parameter to addNewRow(ADD_NEW_ROW) action.
Codecov Report
@@ Coverage Diff @@
## master #129 +/- ##
==========================================
+ Coverage 81.33% 81.34% +<.01%
==========================================
Files 111 111
Lines 4490 4492 +2
==========================================
+ Hits 3652 3654 +2
Misses 838 838
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to run npm run lint
, I've made a comment on one stylistic issue but everything else looks great!
@@ -160,7 +160,8 @@ export const addNewRow = (state, { rowId, stateKey }) => { | |||
data = new List(); | |||
} | |||
|
|||
const newData = data.unshift(newRow); | |||
rowIndex = rowIndex===undefined?0:rowIndex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rowIndex = rowIndex === undefined
? 0
: rowIndex;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greate! Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, once you push the change, I will merge!
I have push the coding style change for "? :" operator . Do I need to create a new pull request or can you merge from this pull request on my "addnewrowatpos" branch? |
I have test it to add a new row into a specific location and confirmed that it works. However it fails some testing on 'npm t'. Please take a look.