Open ggowan opened 7 years ago
We should implement number parsing in the column helper here -> https://github.com/swimlane/ngx-datatable/blob/master/src/utils/column-helper.ts#L12-L50
Would you mind PR'n this change? We should handle min/max etc too.
Hi @amcdnl, I want to contribute to this repo and this seems like a good starting point. However regarding the issue, why to change the column helper given the problem is actually the attribute set on the table itself? Could you please enlighten me? Thanks!
I'm submitting a ... (check one with "x")
Current behavior If you create an ngx-datatable with attribute limit=10, page sizes are variable - when you advance to the second page you'll see unexpectedly large page size. The reason is that the limit comes through as a string because I didn't do [limit]=10, so then all the math is doing string concatenation instead of addition (i.e. 10+10 = 1010).
It took me a while to debug this because I'm a noob. It would be more forgiving if we could just convert all the inputs to the correct type, and save me having to type [limit] instead of limit.
Expected behavior setting limit=10 sets page size to 10 consistently on all pages.
Reproduction of the problem When I repro'd I didn't use a vertical scrollbar. Just set limit like this: <ngx-datatable [rows]="rows" [columns]="columns" limit=10 footerHeight=50
What is the motivation / use case for changing the behavior? Make it easier for people without much experience to use this component successfully.
Please tell us about your environment: Linux.
Table version: 0.7.x 7.0.0
Angular version: 2.0.x 4.0.0-rc.5
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 ] I only tried Chrome 57.0.2987.110 (64-bit)
Language: [all | TypeScript X.X | ES6/7 | ES5] TypeScript