Unable to add a row if sorting is set
See original GitHub issueI’m submitting a … (check one with “x”) bug report
Current behavior Add doesn’t work if sorting is enabled
Expected behavior Add works fine even if sorting is enabled
Reproduction of the problem
- Open
Basic/Live Data
page demo in a browser - Set sorting on any column
- Click
Add
button at the top
What is the motivation / use case for changing the behavior? Adding rows while sorting is set? 😃
Please tell us about your environment: Windows 8.1 x64 Node 7.7.3
-
Table version: 0.8.x The latest from the repo
-
Angular version: 2.0.x The latest from the repo
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] Chrome 58.0.3029.81
-
Language: [all | TypeScript X.X | ES6/7 | ES5] all
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:9 (1 by maintainers)
Top Results From Across the Web
excel won't sort the first row in a set of selected rows
Hi, I'd like to sort some data in an excel spreadsheet alphabetically, according to the content of the second column.
Read more >How to Sort in Excel Rows or Columns Avoid Sort Problems
If you are sorting on multiple columns, click the Add Level button, to add the next level, and select options from its drop...
Read more >Unable to Add Row in Excel - Super User
I assume you have selected the columns only when you defined your table, so the table already cover all of the lot-lot available...
Read more >Adding new data in excel and cannot be sorted or filtered
Another solution which may not be as obvious is to Un-click the filter button under the data tab and then re-click filter.
Read more >Excel Can't Insert New Cells Because it Would Push Non ...
This error is often caused because there is something in the last row or column of the worksheet. This video demonstrates how to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
sortRows() returns the copy of rows. https://github.com/swimlane/ngx-datatable/blob/9.2.0/src/utils/sort.ts#L67
If we enable client-side sorting, this copy will be assigned to ngx-datatable’s rows. https://github.com/swimlane/ngx-datatable/blob/9.2.0/src/components/datatable.component.ts#L107
So, our rows array has different reference from ngx-datatable’s rows at the beginning.
My work around is re-assigning rows after modified.
This is the case also with remove.