@@ -46,11 +46,24 @@ const GRAND_TOTAL_VALUE = 'Grand Total';
4646// - totals row formatting [DONE]
4747// - totals row: copy cell unformatted [DONE]
4848// - copy selection with headers - fix column mapping, fix case with only totals row selected [DONE]
49- // - ^ unit tests
50- // - totals column move to back
51- // - col based operations - save/restore settings on model change
52- // - flags to hide unsupported table options - go to row, filters, search, organize columns, etc
49+ // - fix Grand Total text in non-string columns [DONE]
50+ // - disable sort on col columns [DONE]
51+ // - disable filters, advanced filters on col columns [DONE]
52+ // - disable Search Bar [DONE]
53+ // - disable Download CSV [DONE]
54+
55+ // - disable Organize columns
56+ // - disable Go to row
57+
5358// - fix sub/unsubscribe on model change
59+ // - totals column move to back
60+
61+ // - DH.UI example with selectable aggregation functions
62+
63+ // - column order, column resize, visibility, etc -- save/restore settings on model change (or disable?)
64+ // - if the above works, enable sorting, filtering, etc.
65+
66+ // - ^ unit tests
5467
5568/**
5669 * Model which proxies calls to IrisGridModel.
@@ -247,6 +260,14 @@ class IrisGridSimplePivotModel extends IrisGridModel {
247260 return false ;
248261 }
249262
263+ isFilterable ( columnIndex : ModelIndex ) : boolean {
264+ return columnIndex < this . schema . rowColNames . length ;
265+ }
266+
267+ isColumnSortable ( columnIndex : ModelIndex ) : boolean {
268+ return columnIndex < this . schema . rowColNames . length ;
269+ }
270+
250271 get isTotalsAvailable ( ) : boolean {
251272 // Hide Aggregate Columns option in Table Settings
252273 return false ;
@@ -256,6 +277,11 @@ class IrisGridSimplePivotModel extends IrisGridModel {
256277 return false ;
257278 }
258279
280+ get isExportAvailable ( ) : boolean {
281+ // table.freeze is available, but exporting requires extra logic for column mapping and totals rows
282+ return false ;
283+ }
284+
259285 get isCustomColumnsAvailable ( ) : boolean {
260286 return false ;
261287 }
@@ -302,6 +328,13 @@ class IrisGridSimplePivotModel extends IrisGridModel {
302328 return this . model . valueForCell ( x , y ) ;
303329 }
304330
331+ textForCell ( x : ModelIndex , y : ModelIndex ) : string {
332+ return this . schema . hasTotals && y === this . rowCount - 1 && x === 0
333+ ? GRAND_TOTAL_VALUE
334+ : // Pass the context so model.textForCell calls this.valueForCell instead of model.valueForCell
335+ this . model . textForCell . call ( this , x , y ) ;
336+ }
337+
305338 setTotalsTable ( totalsTable : DhType . Table | null ) : void {
306339 log . debug ( 'setTotalsTable' , totalsTable ) ;
307340
@@ -475,6 +508,7 @@ class IrisGridSimplePivotModel extends IrisGridModel {
475508 columnGroups : [ ] ,
476509 areSavedLayoutsAllowed : false ,
477510 frontColumns : [ ] ,
511+ searchDisplayMode : this . dh . SearchDisplayMode . SEARCH_DISPLAY_HIDE ,
478512 } ;
479513 }
480514
0 commit comments