Creating Card Resources that readonly non updatable resources fields
This commit is contained in:
@@ -32,8 +32,8 @@ export const CrudForm: React.FC<CrudFormProps> = (props) => {
|
||||
useEffect(() => {
|
||||
const fetchSchema = async () => {
|
||||
try {
|
||||
const schemaFullName = id === undefined ? `${schemaName}Create` : `${schemaName}Update`;
|
||||
const resourceSchema = await jsonschemaProvider.getResourceSchema(schemaFullName);
|
||||
const resourceSchema = id === undefined ? await jsonschemaProvider.getCreateResourceSchema(schemaName)
|
||||
: await jsonschemaProvider.getCardResourceSchema(schemaName);
|
||||
setSchema(resourceSchema);
|
||||
setSchemaLoading(false);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user