🎥 Make videos programmatically with React
Unwrap default schema wrapper for number constraints and display
Jonny Burger6dedfdc9e4b6
diff --git a/packages/studio/src/components/Timeline/TimelineExpandedSection.tsx b/packages/studio/src/components/Timeline/TimelineExpandedSection.tsxindex 88a6b852cc..0e6e60c81c 100644--- a/packages/studio/src/components/Timeline/TimelineExpandedSection.tsx+++ b/packages/studio/src/components/Timeline/TimelineExpandedSection.tsx@@ -65,10 +65,10 @@ const TimelineFieldRow: React.FC<{}> = ({field, onSave, onDragValueChange, onDragEnd, propStatus}) => {const effectiveCodeValue = propStatus?.canUpdate? (propStatus.codeValue ??- field.currentValue ??- (field.typeName === 'default'- ? getDefaultValue(field.fieldSchema)- : undefined))+ field.currentValue ??+ (field.typeName === 'default'+ ? getDefaultValue(field.fieldSchema)+ : undefined)): undefined;const saving =propStatus !== null &&diff --git a/packages/studio/src/components/Timeline/TimelineSchemaField.tsx b/packages/studio/src/components/Timeline/TimelineSchemaField.tsxindex 9dec59067a..f260f7dbeb 100644--- a/packages/studio/src/components/Timeline/TimelineSchemaField.tsx+++ b/packages/studio/src/components/Timeline/TimelineSchemaField.tsx@@ -2,16 +2,16 @@ import type {CanUpdateSequencePropStatus} from '@remotion/studio-shared';import React, {useCallback, useEffect, useRef, useState} from 'react';import type {SchemaFieldInfo} from '../../helpers/timeline-layout';import {InputDragger} from '../NewComposition/InputDragger';-import {- getDefaultValue,- getInnerType,- getZodSchemaType,-} from '../RenderModal/SchemaEditor/zod-schema-type';import {getZodNumberMaximum,getZodNumberMinimum,getZodNumberStep,} from '../RenderModal/SchemaEditor/zod-number-constraints';+import {+ getDefaultValue,+ getInnerType,+ getZodSchemaType,+} from '../RenderModal/SchemaEditor/zod-schema-type';import {Spinner} from '../Spinner';const unsupportedLabel: React.CSSProperties = {@@ -138,7 +138,9 @@ export const TimelineFieldValue: React.FC<{const effectiveCodeValue =propStatus.codeValue ??field.currentValue ??- (field.typeName === 'default' ? getDefaultValue(field.fieldSchema) : undefined);+ (field.typeName === 'default'+ ? getDefaultValue(field.fieldSchema)+ : undefined);const resolvedTypeName =field.typeName === 'default'