angular-ui/ui-grid

Tooltips take the cell's filter even when not needed

Open

#4 302 ouverte le 1 sept. 2015

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)JavaScript (2 496 forks)batch import
help wanted

Métriques du dépôt

Stars
 (5 395 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Hi, I've tried to setup a cell tooltip for a filtered cell.
I've followed the code in ui-grid and found some issues (https://github.com/angular-ui/ui-grid/blob/fcbafc6c3594be9aa75fa35d69b9bf01bf3925cd/src/js/core/services/gridClassFactory.js#L114).

I have 2 cases in which this is a problem:

  1. I want to filter the cell content, and in a tooltip show the unfiltered content.
  2. I want to enact a different filter on the tooltip (or enact the filter in the tooltip's function).

These 2 use cases are very close to each other and there are several variants I can think of for each.

I've implemented my solution in my app: Set a tooltipFilter property in the colDef that would either be unedfined (to use the cell's filter), a string/function that returns a string (for a filter) or false (for no filter).

What do you think? Is there a better way to do this?

Guide contributeur