Browse Source

fix(extensions): org chart: fix edge case

pull/9860/head
amandesai01 2 weeks ago
parent
commit
21d50a39fb
  1. 22
      packages/nc-gui/components/nc/Select.vue
  2. 8
      packages/nc-gui/utils/dataUtils.ts

22
packages/nc-gui/components/nc/Select.vue

@ -46,19 +46,19 @@ const onChange = (value: string) => {
<template> <template>
<a-select <a-select
v-model:value="vModel" v-model:value="vModel"
:size :size="size"
:allow-clear :allow-clear="allowClear"
:disabled="loading" :disabled="loading"
:dropdown-class-name :dropdown-class-name="dropdownClassName"
:dropdown-match-select-width :dropdown-match-select-width="dropdownMatchSelectWidth"
:filter-option :filter-option="filterOption"
:loading :loading="loading"
:mode :mode="mode"
:placeholder :placeholder="placeholder"
:show-search :show-search="showSearch"
:max-tag-count :max-tag-count="maxTagCount"
class="nc-select" class="nc-select"
@change="onChange" @change="onChange as any"
> >
<template #suffixIcon> <template #suffixIcon>
<GeneralLoader v-if="loading" /> <GeneralLoader v-if="loading" />

8
packages/nc-gui/utils/dataUtils.ts

@ -140,18 +140,12 @@ export const rowDefaultData = (columns: ColumnType[] = []) => {
return defaultData return defaultData
} }
export const isRowEmpty = (record: Row, col: ColumnType): boolean => { export const isRowEmpty = (record: Pick<Row, 'row'>, col: ColumnType): boolean => {
if (!record || !col || !col.title) return true if (!record || !col || !col.title) return true
return !isValidValue(record.row[col.title]) return !isValidValue(record.row[col.title])
} }
export const isRowRecordEmpty = (record: Record<string, any>, col: ColumnType): boolean => {
if (!record || !col || !col.title) return true
return !isValidValue(record[col.title])
}
export function validateRowFilters(_filters: FilterType[], data: any, columns: ColumnType[], client: any) { export function validateRowFilters(_filters: FilterType[], data: any, columns: ColumnType[], client: any) {
if (!_filters.length) { if (!_filters.length) {
return true return true

Loading…
Cancel
Save