mi6 / mi6/ic-ui-kit

[ic-data-table] sortable slotted columns

Open
#2,777 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

## Summary
I should be able to specify a string / number value that can be used as a sort key for a column that it has been slotted in to the data table.

- [ ] Add prop to disable sorting on a column
- [ ] Add functionality for sorting slotted content

## 💬 Description

This column is a timestamp value that has been formatted for display:

![image](https://github.com/user-attachments/assets/e3a0f530-0845-4c4c-83a1-30499fda243d)

![image](https://github.com/user-attachments/assets/00bbcb25-c58b-4198-b51f-1c927fb0e959)

I would like to be able to sort on this in some way but currently trying to sort a slotted column does nothing

## 💰 Use value
Slotted columns are currently broken for sorting, the sort function is there and does nothing, at a minimum it should be hidden but ideally it should work

## 📝 Acceptance Criteria
If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.

*Given*
*When*
*Then*

## ✏ Designs
If there's a Figma design file (or other mock-up), include it here.

## 🧾 Guidance
If there's written guidance or documentation, include a link to it here.

## Additional info
Tell us anything else useful to help us understand your suggestion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names the ic-data-table component but does not identify source files or tests; start by locating its existing sorting behavior and how slotted columns are represented. Clarify and cover both disabling sorting for a column and supplying a string or number sort key for slotted content, including the formatted timestamp case.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.