OfficeDev / microsoft-teams-ui-component-library

Component library enhanced experiences styled for use in Microsoft Teams custom applications.
MIT License
127 stars 30 forks source link

The List component and Table the columns not hiding. #61

Closed BesnikMahmuti-Prosperoware closed 3 years ago

BesnikMahmuti-Prosperoware commented 3 years ago

image image My List config looks exactly the same as one from the example but for me, it's not working as expected.

const listConfig: any = {
  columns: {
    c1: {
      title: "Member name",
      sortable: "alphabetic",
      minWidth: 100,
      hideable: false
    },
    c2: {
      title: "Location",
      hideable: true,
      minWidth: 100,
      sortable: "alphabetic",
    },
    c3: {
      title: "Role",
      minWidth: 100,
      hideable: true,
      hidePriority: 1,
      sortable: "alphabetic",
    },
  },
  rows: {
    r4: {
      c1: "Babak Shammas (no delete)",
      c2: "Seattle, WA",
      c3: "Senior analyst",
      actions: {
        share: { title: "Share", icon: "ShareGeneric" },
        manage: { title: "Edit", icon: "Edit" },
      },
    },
    r1: {
      c1: "Aadi Kapoor",
      c2: "Seattle, WA",
      c3: "Security associate",
      actions: {
        share: { title: "Share", icon: "ShareGeneric" },
        manage: { title: "Edit", icon: "Edit" },
        delete: { title: "Delete", icon: "TrashCan", multi: true },
      },
    },
    r2: {
      c1: "Aaron Buxton",
      c2: "Seattle, WA",
      c3:
        "Security engineer: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in ultricies mi. Sed aliquet odio et magna maximus, et aliquam ipsum faucibus. Sed pulvinar vel nibh eget scelerisque. Vestibulum ornare id felis ut feugiat. Ut vulputate ante non odio condimentum, eget dignissim erat tincidunt. Etiam sodales lobortis viverra. Sed gravida nisi at nisi ornare, non maximus nisi elementum.",
      actions: {
        share: { title: "Share", icon: "ShareGeneric" },
        manage: { title: "Edit", icon: "Edit" },
        delete: { title: "Delete", icon: "TrashCan", multi: true },
      },
    },
    r3: {
      c1: "Alvin Tao (no actions)",
      c2: "Seattle, WA",
      c3: "Marketing analyst",
    },
    r5: {
      c1: "Beth Davies",
      c2: "Seattle, WA",
      c3: "Senior engineer",
      actions: {
        share: { title: "Share", icon: "ShareGeneric" },
        manage: { title: "Edit", icon: "Edit" },
        delete: { title: "Delete", icon: "TrashCan", multi: true },
      },
    },
  },
  onInteraction: (e) => {
      console.log("onInteraction" ,e);
  }
};
dvdzkwsk commented 3 years ago

@BesnikMahmuti-Prosperoware, sorry to hear that. Are you able to post a minimal reproduction, such as with http://codesandbox.io? I've copied as much of your code as possible to https://codesandbox.io/s/naughty-turing-seglx?file=/src/index.tsx and the columns appear to be hiding correctly for me when the viewport shrinks. Is that not the case for you? Or is there something else you're expecting to see?

BesnikMahmuti-Prosperoware commented 3 years ago

Yes, that was the case but I found the issue was due to some style on HTML and body. Thank you very much for your reply I really appreciated it.

dvdzkwsk commented 3 years ago

Glad to hear you fixed it. Thanks for the update, @BesnikMahmuti-Prosperoware .