Browse Source

feat(nc-gui): add showNullAndEmptyInFilter

pull/5106/head
Wing-Kam Wong 2 years ago
parent
commit
dc314b70fc
  1. 22
      packages/nc-gui/components/dashboard/settings/Misc.vue
  2. 1
      packages/nc-gui/composables/useGlobal/state.ts
  3. 1
      packages/nc-gui/composables/useGlobal/types.ts

22
packages/nc-gui/components/dashboard/settings/Misc.vue

@ -1,7 +1,8 @@
<script setup lang="ts">
import { useGlobal, useProject, watch } from '#imports'
const { includeM2M, showNull } = useGlobal()
const { includeM2M, showNull, showNullAndEmptyInFilter } = useGlobal()
const { loadTables } = useProject()
watch(includeM2M, async () => await loadTables())
@ -11,14 +12,25 @@ watch(includeM2M, async () => await loadTables())
<div class="flex flex-row w-full">
<div class="flex flex-col w-full">
<div class="flex flex-row items-center w-full mb-4 gap-2">
<!-- Show M2M Tables -->
<!-- Show M2M Tables -->
<a-checkbox v-model:checked="includeM2M" v-e="['c:themes:show-m2m-tables']" class="nc-settings-meta-misc">
{{ $t('msg.info.showM2mTables') }}
{{ $t('msg.info.showM2mTables') }} <br/>
<span class="text-gray-500">{{ $t('msg.info.showM2mTablesDesc')}}</span>
</a-checkbox>
</div>
<div class="flex flex-row items-center w-full mb-4 gap-2">
<!-- Show NULL -->
<a-checkbox v-model:checked="showNull" v-e="['c:settings:show-null']" class="nc-settings-show-null">Show NULL</a-checkbox>
<!-- Show NULL -->
<a-checkbox v-model:checked="showNull" v-e="['c:settings:show-null']" class="nc-settings-show-null">
{{ $t('msg.info.showNullInCells')}} <br/>
<span class="text-gray-500">{{ $t('msg.info.showNullInCellsDesc')}}</span>
</a-checkbox>
</div>
<div class="flex flex-row items-center w-full mb-4 gap-2">
<!-- Show NULL and EMPTY in Filters -->
<a-checkbox v-model:checked="showNullAndEmptyInFilter" v-e="['c:settings:show-null']" class="nc-settings-show-null">
{{ $t('msg.info.showNullAndEmptyInFilter')}} <br/>
<span class="text-gray-500">{{ $t('msg.info.showNullAndEmptyInFilterDesc')}}</span>
</a-checkbox>
</div>
</div>
</div>

1
packages/nc-gui/composables/useGlobal/state.ts

@ -63,6 +63,7 @@ export function useGlobalState(storageKey = 'nocodb-gui-v2'): State {
previewAs: null,
includeM2M: false,
showNull: false,
showNullAndEmptyInFilter: false,
currentVersion: null,
latestRelease: null,
hiddenRelease: null,

1
packages/nc-gui/composables/useGlobal/types.ts

@ -31,6 +31,7 @@ export interface StoredState {
previewAs: ProjectRole | null
includeM2M: boolean
showNull: boolean
showNullAndEmptyInFilter: boolean
currentVersion: string | null
latestRelease: string | null
hiddenRelease: string | null

Loading…
Cancel
Save