fin-hypergrid / fin-hypergrid/core

setRowMetadata not working

Open
#800 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
907
Forks
139
PR merge metrics
No merged PRs in 30d

Description

Cannot get row metadata to work as per wiki:

```
grid.behavior.dataModel.setRowMetadata(1, { lastName: { color: 'red' } });
grid.behavior.changed();
```
__META is set but grid throws an error:
**_Cannot read property '0'_ of undefined** in **assignProps** in layer-props.js
```
propLayers = cellEvent.properties.propClassLayers; \\ this is undefined
```
Trying to hack this doesnt really help much; just propagates the errorr; ended up having to add the below which resulted in empty cell rendered... where exec is the exec from defaults
```
grid.behavior.dataModel.setRowMetadata(1, { lastName: { color: 'blue', propClassLayers: [1,4], exec: exec, grid: grid ,renderer: 'SimpleCell' }})
```

I can see that META object set using cellEventPool from renderer is much richer and works fine.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.