Building a code component for a view or sub-grid
Now that you have learned the process of creating a code component with a field template, let's learn the process of creating a code component with a dataset template. There are a few differences when creating a code component with a dataset template as we are dealing with multiple records rather than a single data object and we will look at those in this section.
In this chapter, we will be building a dataset type code component that will render each contact record in a list as a card. This card will show each column as an item on the card with a value. If the column does not have any data, then it will show a hyphen, (-).
Initializing a new PCF project for a dataset
Similar to the field type code component, we first need to initialize a PCF project. Perform the following steps to create a new component project for a dataset code component:
- Create a new directory named MyDataCardProject, which will be your working...