How to add custom component in details view of React File Manager Component?
This article explains how to add a custom component in the details view of the React File Manager Component. The Button component can be rendered in each row of the details view within the React File Manager component. In order to achieve this requirement, we utilized the detailsViewSettings API and employed the template property to render the Button component.
Refer to the below code sample for further reference.
[Index.js]
const Overview = () => {
let hostUrl = 'https://ej2-aspcore-service.azurewebsites.net/';
function btnClick() {
console.log('button clicked');
}
function buttonTemplate() {
return (
<buttoncomponent cssclass="e-primary">
Click Me
</buttoncomponent>
);
}
return (
<div>
<div classname="control-section">
<filemanagercomponent ajaxsettings="{{" url:="" hosturl="" +="" 'api="" filemanager="" fileoperations',="" getimageurl:="" getimage',="" uploadurl:="" upload',="" downloadurl:="" download',="" }}="" detailsviewsettings="{{" columns:="" [="" {="" field:="" 'name',="" headertext:="" 'file="" name',="" width:="" 'auto',="" },="" '_fm_modified',="" 'last="" modified',="" 'custom',="" template:="" buttontemplate,="" ],="" view="{'Details'}">
<inject services="{[NavigationPane," detailsview,="" toolbar]}="">
</inject></filemanagercomponent>
</div>
</div>
);
};
export default Overview;
Refer to the working sample for additional details and implementation: Sample
Conclusion
We hope you enjoyed learning how to add a custom component in the details view of the React File Manager Component.
You can refer to our React File Manager feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our React File Manager Example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!