setCellMeta is invalid

Tags: #<Tag:0x00007f8b23ea6db0> #<Tag:0x00007f8b23ea6a18>

The setCellMeta method is tested in afterChange method, the value cannot be changed, and the key in the method is?
The code is as follows。


Hi @en_kang

Does it work for you when you add

this.$refs.handsontableRef.hotInstance.render()

after the setCellMeta() call? The setCellMeta() itself does not trigger the cell renderer, which is needed if you want the cell metadata change to be reflected as soon as the user changes a value.

Hello, I am using render method without re-rendering, I suspect that the key of my setCellMeae method is wrong, if data is an array object, whether key is the attribute name or the coordinate

I want to monitor the change of some data and assign a value through the code. Which method can I use

In the following case the name is a custom cell meta value so if you decide to use it then you can read it via getCellMeta(row, column).name or via getCellsMeta() (for the whole table).

However, to be honest, I do not understand what the goal is. Was that your plan to update a cell upon change with custom metadata?

I am using table + formula. I want to listen to the formula before automatically calculating the result and add it to the test property after some other data processing. Can you give me an example? table has beforeChange method, while Formula has afterchange method only.

Could you please briefly refer to the purpose of the resultProp IF condition? The afterFormulasValuesUpdate is not a function.

The beforeChange method is an example of what I saw in issues. I need an example where, after calculating the formula in the above code, I need to pass this value to another property. For example, after the A1 or C1 value in row[0] is changed and the formula value is updated, I need to pass that value to the test property

You might think about using custom cell meta data here. Here’s an example https://jsfiddle.net/handsoncode/tb7rw0xk/ that shows how you can utilize this information. And yes, to run setCellMeta() you can use the afterFormulasValuesUpdate hook.