0
votes

I am trying to create a hyperlink from the data coming as string or array like {"value":["link text~docid","link text1~docid1"]}. I am creating link(s) using cell renderer. But then filter for this column shows "link text~docid". Where as I want it to display only "link text". Issue is when I use valueGetter, it modifies the "params.data.value to {"value":["link text","link text1"]} so I can't generate my hyperlink. I want to check if there is any way in ag-grid to calculate value but keep the params.data intact so that it can be used in cellRenderer?

Example Data

{ "Stream": ["AA Stream (Live) (V2)~LPFC-A7ECNL"], "status": "Approved", "level": "Primary", "title": "adam resource- name change", "Phase": ["adam test phase~UKAT-A6HF9Q"], "id": 0, "Substage": null, "Stage": ["Ga stage 1~UKAT-A7GET3"], "Activity": "11 a~LPFC-A7TC4J" }
1

1 Answers

0
votes

I resolved this issue by duplicating items in my JSON itself. That way changes to data by valueGetter helped fix the default filter entries. And used template (or cellRenderer) to that duplicated data item in my JSON. E.g. I updated my original JSON ({"phase":[title~UNIQ-KEY1]}) to ({"phase":[title~UNIQ-KEY1],"copyphase":[title~UNIQ-KEY1]}).