Browse Source

fix(nc-gui): use math.max instead of ternary operator

pull/7786/head
Ramesh Mane 9 months ago
parent
commit
3ee5e52f60
  1. 2
      packages/nc-gui/composables/useSharedFormViewStore.ts

2
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
}

Loading…
Cancel
Save