Skip to content

Control sorting through props for iTwin and iModel tables - #223

Open
arome wants to merge 25 commits into
mainfrom
omar/save-sort-imodel-table
Open

Control sorting through props for iTwin and iModel tables#223
arome wants to merge 25 commits into
mainfrom
omar/save-sort-imodel-table

Conversation

@arome

@arome arome commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Added the ability to control the sorting of the tables through props.
image

@arome arome changed the title Omar/save sort imodel table Save sort imodel table Jul 10, 2026
@arome
arome marked this pull request as ready for review July 10, 2026 18:01
@arome arome changed the title Save sort imodel table Control sorting through props for iTwin and iModel tables Jul 10, 2026
@arome
arome enabled auto-merge (squash) July 10, 2026 18:02
Comment thread packages/modules/imodel-browser/src/mui/containers/iModelGrid/IModelTableMUI.tsx Outdated
Comment thread packages/modules/imodel-browser/src/mui/containers/iModelGrid/IModelTableMUI.tsx Outdated
Comment thread packages/modules/imodel-browser/src/types.ts Outdated
Comment thread packages/apps/storybook/src/imodel-browser/mui/ITwinGridMUI.stories.tsx Outdated
Comment thread packages/apps/storybook/src/imodel-browser/mui/ITwinGridMUI.stories.tsx Outdated
Comment thread packages/apps/storybook/src/imodel-browser/mui/IModelGridMUI.stories.tsx Outdated
Comment thread packages/apps/storybook/src/imodel-browser/mui/IModelGridMUI.stories.tsx Outdated
Comment thread packages/modules/imodel-browser/src/mui/containers/iModelGrid/IModelGridMUI.tsx Outdated
Comment thread packages/modules/imodel-browser/src/types.ts
Comment thread packages/modules/imodel-browser/src/mui/containers/iModelGrid/IModelTableMUI.tsx Outdated
* Requested sort, e.g. `{ field: "displayName", direction: "asc" }`.
* `undefined` means the default server sort.
*/
sortOptions?: ITwinSortOptionsMUI;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The PR title is clear that these sorting improvements only affect table view. It makes me wonder if we should be handling tile view too. $orderby is ignored for by the API for favorites/recents so we have the clientSideIModelSort. Would it make sense to add clientSideITwinSort too, for consistency?

If not, I guess we should document that this sorting does not always apply to iTwin tile view.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added the clientSideITwinSorting as suggested to match what we have in iModelGrid

Comment thread packages/modules/imodel-browser/src/mui/containers/iModelGrid/IModelTableMUI.tsx Outdated
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.

2 participants