Browse Source

fix(extensions): org chart: fix edge case

pull/9860/head
amandesai01 3 days 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>
<a-select
v-model:value="vModel"
:size
:allow-clear
:size="size"
:allow-clear="allowClear"
:disabled="loading"
:dropdown-class-name
:dropdown-match-select-width
:filter-option
:loading
:mode
:placeholder
:show-search
:max-tag-count
:dropdown-class-name="dropdownClassName"
:dropdown-match-select-width="dropdownMatchSelectWidth"
:filter-option="filterOption"
:loading="loading"
:mode="mode"
:placeholder="placeholder"
:show-search="showSearch"
:max-tag-count="maxTagCount"
class="nc-select"
@change="onChange"
@change="onChange as any"
>
<template #suffixIcon>
<GeneralLoader v-if="loading" />

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

@ -140,18 +140,12 @@ export const rowDefaultData = (columns: ColumnType[] = []) => {
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
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) {
if (!_filters.length) {
return true

Loading…
Cancel
Save