adopted-ember-addons / adopted-ember-addons/ember-light-table

Set cell rowspan based on row value

Aberta
#597 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
311
Forks
130
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

I thought this would be relatively straight forward using a custom cell type:

```
import Cell from 'ember-light-table/components/cells/base';
import { computed, get } from '@ember/object';

export default Cell.extend({
attributeBindings: ['rowspan'],
rowspan: computed('row.content.expanded', 'row.subtaskCount', function() {
if (get(this, 'row.expanded')) {
return get(this, 'row.subtaskCount');
}
})
});
```

However what I find is that row properties are always either null or undefined no matter what I do! Am I missing something?

A followup point to this would be how to disable a cell rendering at all based on a value. Essentially, if my row is 'expanded', I want the first column to span the expanded rows and the expanded rows not to include the first column.

Note: I'm not using the standard implementation of expanded here in favour of something along [these lines](https://github.com/offirgolan/ember-light-table/issues/243#issuecomment-373043700)

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.