Skip to content

Conversation

@arome
Copy link
Contributor

@arome arome commented Jan 3, 2026

What Screenshot
Ability to sort columns in iTwin table view 2026-01-03 03 37 43
Fix console error image
Updated iModelGrid column title from "Last Modified" to "Created Date" to better reflect the actual value being displayed image
Updated iTwinGrid column "Last Modified" to show the last modified date and not the created date
What Before After
Fixed iTwin table rows not taking the full width of the table image image
Remove sorting on favorite column 2026-01-07 16 35 51 2026-01-07 16 36 53

@arome arome requested a review from aruniverse as a code owner January 3, 2026 02:07
@arome arome enabled auto-merge (squash) January 4, 2026 12:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds sorting functionality to iTwin and iModel grid table views, fixes date column labeling, and resolves several UI issues. The changes enable users to sort table columns while maintaining appropriate restrictions on non-sortable columns.

Key changes:

  • Added sorting capability to iTwin and iModel grid tables
  • Corrected column labels and data sources for date fields (Created Date vs Last Modified)
  • Disabled sorting on favorite columns and simplified sorting implementation by removing manual sort handling

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/modules/imodel-browser/src/containers/iModelGrid/useIModelTableConfig.tsx Disabled sorting on favorite column and refactored cell rendering for name and description columns
packages/modules/imodel-browser/src/containers/iModelGrid/IModelGrid.tsx Renamed component from ITwinGridInternal to IModelGridInternal, simplified sort state management, updated column label from "Last Modified" to "Created Date", and removed manual sorting logic
packages/modules/imodel-browser/src/containers/ITwinGrid/useITwinTableConfig.tsx Disabled sorting on favorite column and corrected Last Modified column to use lastModifiedDateTime instead of createdDateTime
packages/modules/imodel-browser/src/containers/ITwinGrid/ITwinGrid.tsx Enabled sorting by adding isSortable prop and cleaned up documentation formatting
packages/apps/storybook/src/imodel-browser/IModelGrid.stories.tsx Added aria-label to IconButton for accessibility
common/changes/@itwin/imodel-browser-react/omar-add-sorting-itwin-grid_2026-01-03-02-11.json Added changelog entry for the patch release

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

arome and others added 2 commits January 8, 2026 15:50
…winTableConfig.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@simihartstein
Copy link
Contributor

Minor thing, but you didn't mention the table loading state (a much needed addition) in the pr description

@arome
Copy link
Contributor Author

arome commented Jan 8, 2026

Minor thing, but you didn't mention the table loading state (a much needed addition) in the pr description

what was changed with the table loading state?

/** Generic message displayed if an error occurs while fetching. */
error?: string;
/** Displayed on table while loading data. */
tableLoadingData?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more sense to pass a component rather than a string?

viewMode === "cells"
? {
sortType: "name",
descending: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused on this one. Does this mean it will always be descending in tiles mode?

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

Successfully merging this pull request may close these issues.

3 participants