Concatenate data, or show two fields like FName and LName in dynamic cells
Hi! Loved the features of Angular Data Table, but came across a issue. We return first and last name in separate json fields, and I couldn't find a native way to display two "prop" in the same field.
I know I can use expressive markup to load it into a hard coded column design, that works just fine. But I mostly switched to Angular Data Table for the draggable and configurable column features. I'm using the Column Add demo as the base.
Tried this:
$scope.cur = [ { name: "Full Name", prop: "fname lname", width: 200 } ];
From this (simplified) data:
"fname":"John","lname":"Smith"
I suppose I can concatenate in another function, and push a new field called "fullname", but that really adds complexities to the app.
Thanks for any help!
You'll want to use the cell renderer for this, and you probably wouldn't need to set a prop. Check out this pen for an example: http://codepen.io/properjon/pen/jyxddZ