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

[ic-data-table] Slotted column elements do not appear unless the column key is present in the data objects #2866

Closed
jw18968 opened this issue Dec 4, 2024 · 2 comments

Comments

@jw18968
Copy link
Contributor

jw18968 commented Dec 4, 2024

Summary of the bug

When placing elements with a table row through the use of the slot prop, if the column's key is not present in the data objects, the element is not displayed.

🪜 How to reproduce

  1. From the "Links and Elements in data" example on the ICDS site, open the React example in StackBlitz. You will see that the actions column is empty.
  2. Add the 'actions' key to any of the objects within the data array (example shown below) and the action buttons will appear.
const data = [
    {
      firstName: 'Sarah',
      lastName: 'Smith',
      age: 28,
      actions: undefined
    }
]

📸 Screenshots or code

image

🖥 📱 Device

  • Type: Desktop
  • Device: MacBook
  • OS version: macOS15
  • Browser version: Chrome 131

🧐 Expected behaviour

I expect the slotted elements to be displayed in the column when the column type is 'element', regardless of whether the column key is present in the provided data.

@timja
Copy link
Contributor

timja commented Dec 5, 2024

@jw18968 I think this fixes your issue: #2760

Mind testing it? Otherwise it will be released soon I expect

@jw18968
Copy link
Contributor Author

jw18968 commented Dec 5, 2024

@timja #2760 does appear to have fixed this issue! Thanks for pointing me to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants