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 v-else class="nc-form-wrapper h-full w-full flex" data-testid="nc-form-wrapper">
<div v-if="isLoadingFormView" class="flex-1"></div>
<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 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
v-else-if="formViewData"
class="flex-1 h-full overflow-auto nc-form-scrollbar p-6"
:style="{background:(formViewData?.meta as Record<string,any>).background_color || '#F9F9FA'}"
>
@ -1424,10 +1431,16 @@ useEventListener(
</NcTooltip>
<span>)</span>
</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>
<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>
</template>
@ -1593,6 +1606,7 @@ useEventListener(
</Pane>
</Splitpanes>
</div>
</template>
</div>
</template>
<div

Loading…
Cancel
Save