diff --git a/projects/angular/components/ui-grid/src/components/ui-grid-search/ui-grid-custom-search.directive.ts b/projects/angular/components/ui-grid/src/components/ui-grid-search/ui-grid-custom-search.directive.ts new file mode 100644 index 000000000..f8e7141c3 --- /dev/null +++ b/projects/angular/components/ui-grid/src/components/ui-grid-search/ui-grid-custom-search.directive.ts @@ -0,0 +1,15 @@ +import { + ContentChild, + Directive, + TemplateRef, +} from '@angular/core'; + +@Directive({ + selector: '[uiGridCustomSearch], ui-grid-custom-search', +}) +export class UiGridCustomSearchDirective { + @ContentChild(TemplateRef, { + static: true, + }) + html?: TemplateRef; +} diff --git a/projects/angular/components/ui-grid/src/public_api.ts b/projects/angular/components/ui-grid/src/public_api.ts index 1ff26f8b4..59a0c82b4 100644 --- a/projects/angular/components/ui-grid/src/public_api.ts +++ b/projects/angular/components/ui-grid/src/public_api.ts @@ -19,6 +19,7 @@ export { UiGridRowCardViewDirective } from './body/ui-grid-row-card-view.directi export { UiGridLoadingDirective } from './body/ui-grid-loading.directive'; export { UiGridNoContentDirective } from './body/ui-grid-no-content.directive'; export { UiGridSearchComponent } from './components/ui-grid-search/ui-grid-search.component'; +export { UiGridCustomSearchDirective } from './components/ui-grid-search/ui-grid-custom-search.directive'; export { UiGridSearchModule } from './components/ui-grid-search/ui-grid-search.module'; export { UiGridToggleColumnsModule } from './components/ui-grid-toggle-columns/ui-grid-toggle-columns.module'; export { UiGridToggleColumnsComponent } from './components/ui-grid-toggle-columns/ui-grid-toggle-columns.component'; diff --git a/projects/angular/components/ui-grid/src/ui-grid.component.html b/projects/angular/components/ui-grid/src/ui-grid.component.html index 897139657..8a3d0550b 100644 --- a/projects/angular/components/ui-grid/src/ui-grid.component.html +++ b/projects/angular/components/ui-grid/src/ui-grid.component.html @@ -26,17 +26,23 @@ - - + + + + + + + + diff --git a/projects/angular/components/ui-grid/src/ui-grid.component.ts b/projects/angular/components/ui-grid/src/ui-grid.component.ts index d4ac7dc9d..37d61322b 100644 --- a/projects/angular/components/ui-grid/src/ui-grid.component.ts +++ b/projects/angular/components/ui-grid/src/ui-grid.component.ts @@ -76,6 +76,7 @@ import { UiGridNoContentDirective } from './body/ui-grid-no-content.directive'; import { UiGridRowActionDirective } from './body/ui-grid-row-action.directive'; import { UiGridRowCardViewDirective } from './body/ui-grid-row-card-view.directive'; import { UiGridRowConfigDirective } from './body/ui-grid-row-config.directive'; +import { UiGridCustomSearchDirective } from './components/ui-grid-search/ui-grid-custom-search.directive'; import { ISuggestDropdownValueData } from './filters/ui-grid-dropdown-filter.directive'; import { UiGridSearchFilterDirective } from './filters/ui-grid-search-filter.directive'; import { UiGridFooterDirective } from './footer/ui-grid-footer.directive'; @@ -548,6 +549,16 @@ export class UiGridComponent }) header?: UiGridHeaderDirective; + /** + * Custom search directive reference. + * + * @ignore + */ + @ContentChild(UiGridCustomSearchDirective, { + static: true, + }) + search?: UiGridCustomSearchDirective; + /** * Column directive reference list. * diff --git a/projects/angular/components/ui-grid/src/ui-grid.module.ts b/projects/angular/components/ui-grid/src/ui-grid.module.ts index e32cc4679..ab5aebd85 100644 --- a/projects/angular/components/ui-grid/src/ui-grid.module.ts +++ b/projects/angular/components/ui-grid/src/ui-grid.module.ts @@ -16,6 +16,7 @@ import { UiSuggestModule } from '@uipath/angular/components/ui-suggest'; import { UiNgLetModule } from '@uipath/angular/directives/ui-ng-let'; import { UiVirtualScrollViewportResizeModule } from '@uipath/angular/directives/ui-virtual-scroll-viewport-resize'; +import { UiGridCustomSearchDirective } from './components/ui-grid-search/ui-grid-custom-search.directive'; import { UiGridColumnDirective } from './body/ui-grid-column.directive'; import { UiGridExpandedRowDirective } from './body/ui-grid-expanded-row.directive'; import { UiGridLoadingDirective } from './body/ui-grid-loading.directive'; @@ -69,6 +70,7 @@ import { UiGridComponent } from './ui-grid.component'; UiGridNoContentDirective, UiGridLoadingDirective, UiGridRowCardViewDirective, + UiGridCustomSearchDirective, ], exports: [ UiGridComponent, @@ -84,6 +86,7 @@ import { UiGridComponent } from './ui-grid.component'; UiGridNoContentDirective, UiGridLoadingDirective, UiGridRowCardViewDirective, + UiGridCustomSearchDirective, ], }) export class UiGridModule { }