Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: search button order config #594

Merged
Prev Previous commit
Next Next commit
Update search-header.component.ts
JordenReuter authored Nov 13, 2024
commit 6da5ada35b1009c99c61a2c48853df917917d6ab
Original file line number Diff line number Diff line change
@@ -175,15 +175,14 @@ export class SearchHeaderComponent implements AfterContentInit, AfterViewInit {
updateHeaderActions() {
const headerActions: Action[] = []
if (this.hasAdvanced) {
;(this.simpleAdvancedAction.labelKey =
this.viewMode === 'basic'
? 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.ADVANCED.TEXT'
: 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.SIMPLE.TEXT'),
(this.simpleAdvancedAction.titleKey =
this.viewMode === 'basic'
? 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.ADVANCED.DETAIL'
: 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.SIMPLE.DETAIL'),
headerActions.push(this.simpleAdvancedAction)
this.simpleAdvancedAction.labelKey = this.viewMode === 'basic'
? 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.ADVANCED.TEXT'
: 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.SIMPLE.TEXT',
this.simpleAdvancedAction.titleKey = this.viewMode === 'basic'
? 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.ADVANCED.DETAIL'
: 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.SIMPLE.DETAIL',

headerActions.push(this.simpleAdvancedAction)
}
this.headerActions = headerActions.concat(this.actions)
}