ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

ui-grid creates extra row when tooltips are activated

Open Gonkaro opened this issue 11 years ago • 4 comments

Hello,

I have this grid :

image

and when I try to add tooltips both to the header and to the rows, it creates an extra row :

image

image

This is how I add the tool tips :

    $scope.gridOptions.columnDefs = [];

       for (var i=0; i<Object.keys(data[0]).length; i++) {

           $scope.gridOptions.columnDefs.push({ field : Object.keys(data[0])[i] , cellTooltip: true, headerTooltip: true });

    }

the var data is a Json with the data from the grid.

I then use

   $scope.gridOptions.data = data;

Is there any way to workaround or solve this issue?

Best Regards,

Gonkaro

edit :

here are my gridOptions

    $scope.gridOptions = {  
                            exporterLinkLabel:                  'get your csv here',
                            exporterPdfDefaultStyle:            {fontSize: 10},
                            exporterPdfTableHeaderStyle:        {fontSize: 12, bold: true, italics: true, color: 'red'},
                            enableSelectAll:                    false,
                            exporterMenuPdf:                    true,
                            exporterCsvFilename:                'Results.csv',
                            exporterCsvLinkElement:             angular.element(document.querySelectorAll(".custom-csv-link-location")),
                            exporterCsvColumnSeparator:         ';',
                            enableHorizontalScrollbar:          0,
                            enableVerticalScrollbar:            verticalScroll,
                            multiSelect:                        false,
                            enableRowHeaderSelection:           false,
                            enableHeaderMenu :                  false,
                            minRowsToShow:                      len,
                            showGridFooter:                     false,
                            enableColumnMenus:                  false,
                            enableColumnSearch:                 false,
                            enableFiltering:                    true,
                            rowHeight:                          22,
                            onRegisterApi:                      function(gridApi){$scope.gridApi = gridApi;},
                          };

Gonkaro avatar Nov 10 '15 13:11 Gonkaro

Doesn't seem to me that playing with column defs would add a row to your data. Are you sure that's the cause? Are you able to provide a plunker? Could you perhaps add a breakpoint and check how many rows there are in your data array at the point the extra row turns up - i.e. is that row actually appearing in your data?

PaulL1 avatar Nov 10 '15 17:11 PaulL1

here's a plunker with the issue as you asked :

http://plnkr.co/edit/NwsLGXoRNtw9eO3QqdPn?p=preview

Gonkaro avatar Nov 10 '15 18:11 Gonkaro

Still having this issue...

Gonkaro avatar Dec 04 '15 09:12 Gonkaro

Cannot reproduce on the latest version.

mportuga avatar May 19 '18 18:05 mportuga