Skip to content

Commit

Permalink
feat(edit-content) remove and doc code #28493
Browse files Browse the repository at this point in the history
  • Loading branch information
oidacra committed Jul 18, 2024
1 parent 10419d2 commit 2640aa1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class DotCategoryFieldSearchComponent {
$isLoading = input<boolean>(false, { alias: 'isLoading' });

constructor() {
// Emit the term to search, if the input is empty hide the result.
this.searchControl.valueChanges
.pipe(
takeUntilDestroyed(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import { DotMessagePipe } from '@dotcms/ui';
import { DotCategoryFieldKeyValueObj } from '../../models/dot-category-field.models';
import { DotCategoryFieldSearchListComponent } from '../dot-category-field-search-list/dot-category-field-search-list.component';

/**
* Represents the Dot Category Field Selected Component.
* @class
* @classdesc The Dot Category Field Selected Component is responsible for rendering the selected categories
* in the Dot Category Field Component.
*/
@Component({
selector: 'dot-category-field-selected',
standalone: true,
Expand Down Expand Up @@ -45,14 +51,10 @@ export class DotCategoryFieldSelectedComponent {
alias: 'categories'
});

/**
* Represents an EventEmitter used for removing items. Emit the key
* of the category
*/
@Output()
removeItem = new EventEmitter<string>();

private convertPathToArray(path: string): string[] {
if (!path) {
return [];
}

return path.split(' / ');
}
}

0 comments on commit 2640aa1

Please sign in to comment.