Skip to content

[Update]: Default PageSize of table - #449

Open
nxanil wants to merge 3 commits into
masterfrom
enhancement/nsg-monitoring-table
Open

[Update]: Default PageSize of table#449
nxanil wants to merge 3 commits into
masterfrom
enhancement/nsg-monitoring-table

Conversation

@nxanil

@nxanil nxanil commented Feb 12, 2021

Copy link
Copy Markdown
Collaborator

@killanch

Updated default PageSize. If pageSize coming from the props then set that pageSize else set the default size.

Dep PR: https://github.com/nuagenetworks/vsd-react-ui/pull/4908

@nxanil
nxanil requested a review from killanch February 12, 2021 13:22
@killanch
killanch requested a review from a team February 12, 2021 18:56
Comment thread Graphs/Table/index.js Outdated

const onScroll = ({ startIndex }) => {
const page = (startIndex / LIMIT) + 1;
const page = (startIndex / (scrollData.pageSize || LIMIT)) + 1;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. use empty object {} as default value for scrollData
  2. change check here using isVariableNonNullAndDefined, const pageSize = isVariableNonNullAndDefined(scrollData.pageSize) ? scrollData.pageSize : LIMIT;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants