Browse Source

refactor(nc-gui): replace inline function with a named function in setup

pull/4969/head
Wing-Kam Wong 2 years ago
parent
commit
5f29b93c2f
  1. 12
      packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue

12
packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue

@ -150,6 +150,11 @@ const selectFilterField = (filter: Filter, index: number) => {
saveOrUpdate(filter, index) saveOrUpdate(filter, index)
} }
const updateFilterValue = (value: string, filter: Filter, index: number) => {
filter.value = value
saveOrUpdateDebounced(filter, index)
}
defineExpose({ defineExpose({
applyChanges, applyChanges,
parentId, parentId,
@ -279,12 +284,7 @@ defineExpose({
class="nc-filter-value-select min-w-[120px]" class="nc-filter-value-select min-w-[120px]"
:column="getColumn(filter)" :column="getColumn(filter)"
:filter="filter" :filter="filter"
@update-filter-value=" @update-filter-value="(value) => updateFilterValue(value, filter, i)"
(value) => {
filter.value = value
saveOrUpdateDebounced(filter, i)
}
"
@click.stop @click.stop
/> />
</template> </template>

Loading…
Cancel
Save