Skip to content

Commit

Permalink
feat: expose more autocomplete options (#633)
Browse files Browse the repository at this point in the history
Added `show-single`, `preserve-order` and `limit`.
  • Loading branch information
cristinecula authored Nov 29, 2024
1 parent f4db6bc commit 5ee5e0d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cosmoz-omnitable-column-autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class OmnitableColumnAutocomplete extends listColumnMixin(
editMinWidth: { type: String, value: '55px' },
keepOpened: { type: Boolean, value: true },
keepQuery: { type: Boolean },
showSingle: { type: Boolean },
preserveOrder: { type: Boolean },
limit: { type: Number },
textual: { type: Function },
};
}
Expand All @@ -51,6 +54,9 @@ class OmnitableColumnAutocomplete extends listColumnMixin(
...super.getConfig?.(column),
keepOpened: column.keepOpened,
keepQuery: column.keepQuery,
showSingle: column.showSingle,
preserveOrder: column.preserveOrder,
limit: column.limit,
textual: column.textual,
};
}
Expand All @@ -76,6 +82,8 @@ class OmnitableColumnAutocomplete extends listColumnMixin(
class="external-values-${column.externalValues}"
?keep-opened=${column.keepOpened}
?keep-query=${column.keepQuery}
?show-single=${column.showSingle}
?preserve-order=${column.preserveOrder}
.textual=${column.textual}
.label=${column.title}
.source=${source}
Expand All @@ -84,6 +92,7 @@ class OmnitableColumnAutocomplete extends listColumnMixin(
.itemRenderer=${column[columnSymbol]?.itemRenderer}
.value=${filter}
.text=${query}
.limit=${column.limit}
.onChange=${onChange(setState)}
.onFocus=${onFocus(setState)}
.onText=${onText(setState)}
Expand Down

0 comments on commit 5ee5e0d

Please sign in to comment.