mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Restore navigation to search page in demo-shell
- Remove deprecated router component - searchChanges and new searchSubmit component outputs work as you would expect - Update tests Refs #737
This commit is contained in:
@@ -45,6 +45,9 @@ export class AlfrescoSearchControlComponent {
|
||||
@Output()
|
||||
searchChange = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
searchSubmit = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
preview = new EventEmitter();
|
||||
|
||||
@@ -74,6 +77,10 @@ export class AlfrescoSearchControlComponent {
|
||||
(value: string) => {
|
||||
this.autocompleteSearchTerm = value;
|
||||
this.searchValid = this.searchControl.valid;
|
||||
this.searchChange.emit({
|
||||
value: value,
|
||||
valid: this.searchValid
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
@@ -98,11 +105,8 @@ export class AlfrescoSearchControlComponent {
|
||||
* @param event Submit event that was fired
|
||||
*/
|
||||
onSearch(event): void {
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
if (this.searchControl.valid) {
|
||||
this.searchChange.emit({
|
||||
this.searchSubmit.emit({
|
||||
value: this.searchTerm
|
||||
});
|
||||
this.searchInput.nativeElement.blur();
|
||||
|
Reference in New Issue
Block a user