Skip to content

Commit

Permalink
The collection should have the columns sortable, and not use a sortFu…
Browse files Browse the repository at this point in the history
…nction. When it is sortable, it uses the value shown in the table.
  • Loading branch information
tesonep committed Apr 28, 2023
1 parent fa5ce86 commit 18d8916
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/NewTools-Inspector-Extensions/Bag.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ Bag >> inspectionItems: aBuilder [
title: 'Items';
evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each key ];
beNotExpandable;
beSortable;
yourself);
addColumn: (SpStringTableColumn new
title: 'Occurences';
evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: (self occurrencesOf: each key) ];
beSortable;
yourself);
items: contents associations;
yourself
Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Inspector-Extensions/Collection.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Collection >> inspectionItems: aBuilder [
addColumn: (SpStringTableColumn new
title: 'Value';
evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each ];
sortFunction: #printString ascending;
beSortable;
yourself);
items: self asOrderedCollection;
yourself
Expand Down

0 comments on commit 18d8916

Please sign in to comment.