I'm new to react-admin. I was following the tutorial and came across the idea of doing something like this because the user's website is just bla.com and it doesn't actually work because you get http://localhost:xxxx/bla.com
as a link. I came up with this method to do it, in typescript. Take it with a grain of salt:
/// user-url.field.tsx
import { UrlField, useRecordContext } from 'react-admin';
export const UserURLField = ({source}: {source: string}) => {
const record = useRecordContext();
const fakeRecord = {
[source]: `http://${record[source]}`,
};
return (
<UrlField source={source} record={fakeRecord}></UrlField>
);
};