diff --git a/packages/nc-gui/composables/useSharedFormViewStore.ts b/packages/nc-gui/composables/useSharedFormViewStore.ts index b393f6b07f..5b73724a06 100644 --- a/packages/nc-gui/composables/useSharedFormViewStore.ts +++ b/packages/nc-gui/composables/useSharedFormViewStore.ts @@ -384,7 +384,7 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share } case UITypes.Rating: { if (!isNaN(Number(value))) { - preFillValue = Number(value) > parseProp(c.meta).max ? parseProp(c.meta).max : Number(value) + preFillValue = Math.min(Math.max(Number(value), 0), parseProp(c.meta).max ?? 5) } break }