Browse Source

fix(nc-gui): add loader in form view

pull/7741/head
Ramesh Mane 9 months ago
parent
commit
8fed55975e
  1. 24
      packages/nc-gui/components/smartsheet/Form.vue

24
packages/nc-gui/components/smartsheet/Form.vue

@ -740,10 +740,17 @@ useEventListener(
</div> </div>
</div> </div>
<div v-else class="nc-form-wrapper h-full w-full flex" data-testid="nc-form-wrapper"> <div v-else class="nc-form-wrapper h-full w-full flex relative" data-testid="nc-form-wrapper">
<div v-if="isLoadingFormView" class="flex-1"></div> <div v-if="isLoadingFormView" class="flex-1 flex items-center justify-center text-center h-full">
<div>
<GeneralLoader size="xlarge" />
<div class="mt-2">
{{ $t('general.loading') }}
</div>
</div>
</div>
<template v-else-if="formViewData">
<div <div
v-else-if="formViewData"
class="flex-1 h-full overflow-auto nc-form-scrollbar p-6" class="flex-1 h-full overflow-auto nc-form-scrollbar p-6"
:style="{background:(formViewData?.meta as Record<string,any>).background_color || '#F9F9FA'}" :style="{background:(formViewData?.meta as Record<string,any>).background_color || '#F9F9FA'}"
> >
@ -1424,10 +1431,16 @@ useEventListener(
</NcTooltip> </NcTooltip>
<span>)</span> <span>)</span>
</div> </div>
<span v-if="isRequired(field, field.required)" class="text-red-500 text-sm align-top">&nbsp;*</span> <span v-if="isRequired(field, field.required)" class="text-red-500 text-sm align-top"
>&nbsp;*</span
>
</div> </div>
</div> </div>
<a-switch :checked="!!field.show" :disabled="field.required || isLocked || !isEditable" size="small" /> <a-switch
:checked="!!field.show"
:disabled="field.required || isLocked || !isEditable"
size="small"
/>
</div> </div>
</div> </div>
</template> </template>
@ -1593,6 +1606,7 @@ useEventListener(
</Pane> </Pane>
</Splitpanes> </Splitpanes>
</div> </div>
</template>
</div> </div>
</template> </template>
<div <div

Loading…
Cancel
Save