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

Listview - Resizable column widths #119

Closed
haifoo opened this issue Sep 4, 2018 · 3 comments
Closed

Listview - Resizable column widths #119

haifoo opened this issue Sep 4, 2018 · 3 comments
Milestone

Comments

@haifoo
Copy link

haifoo commented Sep 4, 2018

Category

[x] Enhancement

[ ] Bug

[x] Question

Currently we can only define minWidth/max-width. Im not sure if i just do not know how to properly set this, or if it is not available yet.

@estruyf estruyf added this to the 1.8.0 milestone Sep 7, 2018
estruyf added a commit that referenced this issue Sep 7, 2018
@estruyf
Copy link
Member

estruyf commented Sep 7, 2018

Thanks @haifoo for reporting this. I have just implemented the isResizable property on the IViewField interface. This allows you to specify for each field which can or should not be resizable.

const viewFields: IViewField[] = [
  {
    name: 'ListItemAllFields.Id',
    displayName: 'ID',
    maxWidth: 40,
    sorting: true,
    isResizable: true
  },
  {
    name: 'ListItemAllFields.Underscore_Field',
    displayName: "Underscore_Field",
    sorting: true,
    isResizable: true
  },
  {
    name: 'Name',
    linkPropertyName: 'ServerRelativeUrl',
    sorting: true,
    isResizable: true
  },
  {
    name: 'ServerRelativeUrl',
    displayName: 'Path',
    render: (item: any) => {
      return <a href={item['ServerRelativeUrl']}>Link</a>;
    },
    isResizable: true
  },
  {
    name: 'Title',
    isResizable: true
  }
];

column-resize

This change will be part of the version 1.8.0 release. You can already test out the beta. More information about beta testing: https://sharepoint.github.io/sp-dev-fx-controls-react/beta/

@estruyf
Copy link
Member

estruyf commented Sep 12, 2018

Closing the issue as version 1.8.0 has just been released.

@estruyf estruyf closed this as completed Sep 12, 2018
@haifoo
Copy link
Author

haifoo commented Sep 17, 2018

thanks for this!

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

No branches or pull requests

2 participants