Skip to content

Commit 3f11847

Browse files
committed
feat: Ember table: auto-convert search fields to kebabcase
1 parent 9a5b868 commit 3f11847

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/mixins/ember-table-route.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Mixin from '@ember/object/mixin';
2+
import { kebabCase } from 'lodash-es';
23

34
export default Mixin.create({
45
queryParams: {
@@ -20,6 +21,7 @@ export default Mixin.create({
2021
},
2122

2223
applySearchFilters(options, params, searchField) {
24+
searchField = kebabCase(searchField);
2325
if (params.search) {
2426
options.pushObject({
2527
name : searchField,

0 commit comments

Comments
 (0)