Skip to content

Commit

Permalink
Fix select component invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
2hu12 committed Sep 23, 2022
1 parent c5a1321 commit cc45863
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 71 deletions.
Expand Up @@ -7,7 +7,7 @@
options=this.options
value=this.value
themeInstance=@themeInstance
class=@themeInstance.changeGroupByField
cssPropertyName=@themeInstance.changeGroupByField
changeValue=@changeGroupingPropertyName
)
sort=this.doSort
Expand Down Expand Up @@ -36,4 +36,4 @@
</div>
{{/if}}
{{/let}}
</div>
</div>
Expand Up @@ -35,15 +35,17 @@
<label for={{this.inputId}} class="emt-sr-only">{{@column.columnTitle}}</label>
<div class={{@themeInstance.inputGroup}}>
{{#if @column.filterWithSelect}}
{{component
(ensure-safe-component @themeInstance.selectComponent)
options=@column.filterOptions
cssPropertyName=@column.cssPropertyName
value=@column.filterString
themeInstance=@themeInstance
class=(concat @themeInstance.input " changeFilterForColumn")
changeValue=this.updateColumnFilter
}}
{{#let (component (ensure-safe-component @themeInstance.selectComponent)) as |Select|}}
<Select
@id={{this.inputId}}
@options={{@column.filterOptions}}
@cssPropertyName={{@column.cssPropertyName}}
@value={{@column.filterString}}
@themeInstance={{@themeInstance}}
@changeValue={{this.updateColumnFilter}}
class="changeFilterForColumn"
/>
{{/let}}
{{else}}
<Input
id={{this.inputId}}
Expand All @@ -70,4 +72,4 @@
{{/if}}
{{/if}}
{{/if}}
</th>
</th>
Expand Up @@ -5,7 +5,6 @@
component (ensure-safe-component @themeInstance.selectComponent)
id=this.inputId
options=@currentPageNumberOptions
label=@themeInstance.currentPageNumberMsg
value=@currentPageNumber
type="number"
themeInstance=@themeInstance
Expand Down Expand Up @@ -72,4 +71,4 @@
{{/if}}
{{/if}}
{{/let}}
</div>
</div>
23 changes: 12 additions & 11 deletions addon/components/models-table/themes/default/row-filtering-cell.hbs
Expand Up @@ -37,16 +37,17 @@
class="{{@themeInstance.formElementWrapper}} {{if @column.filterUsed "has-feedback"}}">
<label for={{this.inputId}} class="emt-sr-only">{{@column.columnTitle}}</label>
{{#if @column.filterWithSelect}}
{{component
(ensure-safe-component @themeInstance.selectComponent)
id=this.inputId
options=@column.filterOptions
cssPropertyName=@column.cssPropertyName
value=@column.filterString
themeInstance=@themeInstance
class=(concat @themeInstance.input " changeFilterForColumn")
changeValue=this.updateColumnFilter
}}
{{#let (component (ensure-safe-component @themeInstance.selectComponent)) as |Select|}}
<Select
@id={{this.inputId}}
@options={{@column.filterOptions}}
@cssPropertyName={{@column.cssPropertyName}}
@value={{@column.filterString}}
@themeInstance={{@themeInstance}}
@changeValue={{this.updateColumnFilter}}
class="changeFilterForColumn"
/>
{{/let}}
{{else}}
<Input
id={{this.inputId}}
Expand All @@ -70,4 +71,4 @@
{{/if}}
{{/if}}
{{/if}}
</th>
</th>
Expand Up @@ -35,16 +35,17 @@
<label for={{this.inputId}} class="emt-sr-only">{{@column.columnTitle}}</label>
<div class="input-group">
{{#if @column.filterWithSelect}}
{{component
(ensure-safe-component @themeInstance.selectComponent)
id=this.inputId
options=@column.filterOptions
cssPropertyName=@column.cssPropertyName
value=@column.filterString
themeInstance=@themeInstance
class=(concat @themeInstance.input " changeFilterForColumn")
changeValue=this.updateColumnFilter
}}
{{#let (component (ensure-safe-component @themeInstance.selectComponent)) as |Select|}}
<Select
@id={{this.inputId}}
@options={{@column.filterOptions}}
@cssPropertyName={{@column.cssPropertyName}}
@value={{@column.filterString}}
@themeInstance={{@themeInstance}}
@changeValue={{this.updateColumnFilter}}
class="changeFilterForColumn"
/>
{{/let}}
{{else}}
<Input
id={{this.inputId}}
Expand Down Expand Up @@ -72,4 +73,4 @@
{{/if}}
{{/if}}
{{/if}}
</th>
</th>
Expand Up @@ -35,16 +35,17 @@
<label for={{this.inputId}} class="emt-sr-only">{{@column.columnTitle}}</label>
<div class={{@themeInstance.inputGroup}}>
{{#if @column.filterWithSelect}}
{{component
(ensure-safe-component @themeInstance.selectComponent)
id=this.inputId
options=@column.filterOptions
cssPropertyName=@column.cssPropertyName
value=@column.filterString
themeInstance=@themeInstance
class=(concat @themeInstance.input " changeFilterForColumn")
changeValue=this.updateColumnFilter
}}
{{#let (component (ensure-safe-component @themeInstance.selectComponent)) as |Select|}}
<Select
@id={{this.inputId}}
@options={{@column.filterOptions}}
@cssPropertyName={{@column.cssPropertyName}}
@value={{@column.filterString}}
@themeInstance={{@themeInstance}}
@changeValue={{this.updateColumnFilter}}
class="changeFilterForColumn"
/>
{{/let}}
{{else}}
<Input
id={{this.inputId}}
Expand All @@ -70,4 +71,4 @@
{{/if}}
{{/if}}
{{/if}}
</th>
</th>
Expand Up @@ -35,18 +35,17 @@
{{#if @column.useFilter}}
<div class={{@themeInstance.filteringCellInternalWrapper}}>
{{#if @column.filterWithSelect}}
{{component
(ensure-safe-component @themeInstance.selectComponent)
id=this.inputId
options=@column.filterOptions
label=@column.columnTitle
placeholder=@column.filterPlaceholder
cssPropertyName=@column.cssPropertyName
value=@column.filterString
themeInstance=@themeInstance
class=(concat @themeInstance.input " changeFilterForColumn")
changeValue=this.updateColumnFilter
}}
{{#let (component (ensure-safe-component @themeInstance.selectComponent)) as |Select|}}
<Select
@id={{this.inputId}}
@options={{@column.filterOptions}}
@cssPropertyName={{@column.cssPropertyName}}
@value={{@column.filterString}}
@themeInstance={{@themeInstance}}
@changeValue={{this.updateColumnFilter}}
class="changeFilterForColumn"
/>
{{/let}}
{{else}}
<this.PaperInput
class={{@themeInstance.input}}
Expand All @@ -68,4 +67,4 @@
{{/if}}
{{/if}}
{{/if}}
</th>
</th>
Expand Up @@ -35,16 +35,17 @@
<div class="filter-wrapper">
<label for={{this.inputId}} class="emt-sr-only">{{@column.columnTitle}}</label>
{{#if @column.filterWithSelect}}
{{component
(ensure-safe-component @themeInstance.selectComponent)
id=this.inputId
options=@column.filterOptions
cssPropertyName=@column.cssPropertyName
value=@column.filterString
themeInstance=@themeInstance
class=(concat @themeInstance.input " changeFilterForColumn")
changeValue=this.updateColumnFilter
}}
{{#let (component (ensure-safe-component @themeInstance.selectComponent)) as |Select|}}
<Select
@id={{this.inputId}}
@options={{@column.filterOptions}}
@cssPropertyName={{@column.cssPropertyName}}
@value={{@column.filterString}}
@themeInstance={{@themeInstance}}
@changeValue={{this.updateColumnFilter}}
class="changeFilterForColumn"
/>
{{/let}}
{{else}}
<Input
id={{this.inputId}}
Expand All @@ -67,4 +68,4 @@
{{/if}}
{{/if}}
{{/if}}
</th>
</th>

0 comments on commit cc45863

Please sign in to comment.