question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom Field Prop

See original GitHub issue

Trying to use the b-table component, made a component that takes my custom props like actions and stuff and everything works fine. Problem, server-side data, trying to use a property of an object in the row, for exemple

//Let's pretend this is one of the rows that comes from serverside
{posts:[".",".."],profile:{UseMe:"yay"}};

What I’m trying to do is to print “yay” into a column so in fields prop I need to find a way into passing “profile.UseMe”

Maybe arrowfunctions of some sort, for example

fields: {
   customProp: (rowData) => { return rowData.profile.UseMe},
   ...
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mosinvecommented, Aug 30, 2017

not exactly, value is the field value, so it should be

 fullName(value) {
   console.log(`${value}`)
   return `${value.UseMe}`
 }

also checkout this fiddle https://jsfiddle.net/cihkem/3hozey0k/

0reactions
SergioReis97commented, Aug 31, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Make a Custom Field Component | Tina Blog
The first approach involves defining a React component and passing it into the component property of a field definition. The Tina Team refers...
Read more >
Pro - ACF
ACF PRO includes extra fields & features to better develop websites including PHP Blocks, Repeatable Fields, Page Building tools, Media Galleries and Custom...
Read more >
Creating a custom field | uniforms | React form library for ...
We can prepare the custom field by creating a React component and wrapping it in a connectField helper. connectField will pass various props...
Read more >
Custom fields - FireCMS
Custom fields. If you need a custom field for your property you can do it by passing a React component to the Field...
Read more >
Create and edit properties - Knowledge Base - HubSpot
Properties are fields that store information on HubSpot records. ... can meet your data requirements before creating a custom property.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found