-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feat: add size listing parameter #881
Conversation
- add the new parameter to Search Keys - add minified param - create default value to listingSize Part of #860
- use DEFAULT_TIME_SEARCH from types/general
d09dc2c
to
8a40489
Compare
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.
Seems to be working fine, just some minor comments
navigate({ | ||
search: s => ({ ...s, listingSize: pageSize }), | ||
}); | ||
}, |
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.
ditto about state
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.
There seems to be a problem when you try to assign a negative number to the ls
parameter, the search parameter goes back to the default but the table doesn't
8a40489
to
66655e2
Compare
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.
Seems to be working fine, there's just some minor improvements to do
- add to tree listing (and alias) and hardware listing routes - define type params as number Part of #860
66655e2
to
72c1293
Compare
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.
Worked well on my tests
const DEFAULT_PAGINATION_STATE = { pageIndex: 0, pageSize: 10 } as const; | ||
|
||
const DECADE = 10; |
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.
nit: You could use DEFAULT_LISTING_SIZE
here
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.
Or something like TABLE_SIZE_STEP
I'd say would work as well. But I agree that DECADE
is not very descriptive
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.
Nice job!
72c1293
to
379e97a
Compare
Add
listingSize
parameter to tree and hardware listing. The alias to this param isls
.How to test
ls
parameterls=13
, the page size will be 20. The max page size is 50.Close #860