Skip to main content

Customizing ResourceList

The ResourceList component can be customized through the ResourceListConfig interface. This allows you to adjust behavior, appearance, and add custom content.

ResourceListConfig Properties

filtersTableInBetweenContainer

Array of React components that will render between the filters and the table. Useful for inserting custom content in this specific location.

oDataConfig

ODataConfig allows you to configure sorting, filtering, selecting fields, and other options for your ResourceList, affecting how it fetches data from the API.

tableConfig

Configuration for the Table component inside the ResourceList.

const resourceListConfig: ResourceListConfig = {
filtersTableInBetweenContainer: [
<CustomBanner/>,
<SomeOtherComponent/>,
],
oDataConfig: {
top: 20,
select: "name",
},
tableConfig: {
maxNumberOfColumns: 10,
filterListPosition.top,
},
};

<ResourceList resourceName="Student" config={resourceListConfig} />;

Customizing EditResource

EditResource can be customized through the EditResourceConfig. It allows you to control the visibility of buttons, title, resource image, and also define custom fields or per-property configuration.

const config: EditResourceConfig = {
showTitle: true,
hideTopSaveButton: false,
propertyConfigs: new Map<string, EditResourcePropertyConfig>([
[
"name",
{
description: "Student`s name",
visible: true,
placeholder: "First and last name",
},
],
]),
};

export function StudentEditPage() {
return <EditResource config={config} />;
}