Skip to content
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

PnP ListView control - When the items reach the number of items more than can be shown on a page/component, it adds horizontal scroll instead of vertical. #648

Closed
zenaidura opened this issue Sep 1, 2020 · 6 comments
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Milestone

Comments

@zenaidura
Copy link

zenaidura commented Sep 1, 2020

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

Version: [1.19.0]

Expected / Desired Behavior / Question

When there is no room to show all items inside browser window, it should only add a vertical scrollbar. Horizontal scrollbar should only be visible when the list view cannot show all the columns in the browser window.

Observed Behavior

When the items reach the number of items more than can be shown on a page/component, it adds horizontal scroll instead of vertical.

Steps to Reproduce

Use a ListView control on the page:

<ListView
                  items={this.state.projectItems}
                  viewFields={viewFields}
                  compact={true}
                  selectionMode={SelectionMode.none}
                  showFilter={true}
                  defaultFilter=""
                  filterPlaceHolder="Search..."/>

Add a new item to the list dynamically that cannot be viewed in the browser window / parent component's height, or load the items more than that can be shown within the height of a parent div, it shows a horizontal bar.
Horizontal scroll should only appear based on current div's width which works fine.

image

The last column in the PnP listview control assumes the remaining width of the page or parents div and somehow miss-calculates in determining the width and height should be and show horizontal bar instead of vertical bar.

  • Resizing the window, recalculates the height and width correctly.

  • This bug occurs in Chrome and not in Edge.

@ghost
Copy link

ghost commented Sep 1, 2020

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Sep 1, 2020
@zenaidura
Copy link
Author

Its been 9 days and sitting here without being assigned to anyone.

@AJIXuMuK
Copy link
Collaborator

@zenaidura - PnP Reusable controls is an open-source initiative. People work on the issues and improvements on their spare time.
That's why we don't have an SLA on fixing bugs.

We will definitely take a look at the issue.

@zenaidura
Copy link
Author

zenaidura commented Sep 11, 2020 via email

@AJIXuMuK AJIXuMuK added status:fixed-next-drop Issue will be fixed in upcoming release. type:bug and removed Needs: Triage 🔍 labels Feb 14, 2021
@AJIXuMuK
Copy link
Collaborator

Hi @zenaidura,

I got it fixed.
Most probably, you were providing empty items array first and then some loaded items. In that case the size of the header and size of the content were calculated separately.

So, first change is - now you can provide items as undefined to the control, no need to provide fake empty array.

But even if you do that, the control should correctly update itself when items are changed.

The fix will be included in the next release.

In a meanwhile you can test the functionality in beta version.

@AJIXuMuK AJIXuMuK added this to the 2.5.0 milestone Feb 14, 2021
@AJIXuMuK
Copy link
Collaborator

AJIXuMuK commented Mar 2, 2021

v2.5.0 has been released.

@AJIXuMuK AJIXuMuK closed this as completed Mar 2, 2021
AJIXuMuK added a commit that referenced this issue Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Projects
None yet
Development

No branches or pull requests

2 participants