[DURACOM-303] refactor param, add example of configuration

This commit is contained in:
FrancescoMolinaro
2025-01-10 18:20:58 +01:00
parent 53335658e0
commit 2c28f75263
3 changed files with 14 additions and 2 deletions

View File

@@ -420,3 +420,12 @@ liveRegion:
messageTimeOutDurationMs: 30000 messageTimeOutDurationMs: 30000
# The visibility of the live region. Setting this to true is only useful for debugging purposes. # The visibility of the live region. Setting this to true is only useful for debugging purposes.
isVisible: false isVisible: false
# Search settings
search:
# Number used to render n UI elements called loading skeletons that act as placeholders.
# These elements indicate that some content will be loaded in their stead.
# Since we don't know how many filters will be loaded before we receive a response from the server we use this parameter for the skeletons count.
# e.g. If we set 5 then 5 loading skeletons will be visualized before the actual filters are retrieved.
defaultFiltersCount: 5

View File

@@ -84,7 +84,7 @@ export class SearchFiltersComponent implements OnInit, OnDestroy {
@Inject(SEARCH_CONFIG_SERVICE) private searchConfigService: SearchConfigurationService, @Inject(SEARCH_CONFIG_SERVICE) private searchConfigService: SearchConfigurationService,
@Inject(APP_CONFIG) protected appConfig: AppConfig, @Inject(APP_CONFIG) protected appConfig: AppConfig,
) { ) {
this.defaultFilterCount = this.appConfig.search.defaultFilterCount ?? 5; this.defaultFilterCount = this.appConfig.search.defaultFiltersCount ?? 5;
} }
ngOnInit(): void { ngOnInit(): void {

View File

@@ -2,7 +2,10 @@ import { Config } from './config.interface';
export interface SearchConfig extends Config { export interface SearchConfig extends Config {
/** /**
* Number used to render n skeletons while the filters are loading * Number used to render n UI elements called loading skeletons that act as placeholders.
* These elements indicate that some content will be loaded in their stead.
* Since we don't know how many filters will be loaded before we receive a response from the server we use this parameter for the skeletons count.
* For instance f we set 5 then 5 loading skeletons will be visualized before the actual filters are retrieved.
*/ */
defaultFilterCount?: number; defaultFilterCount?: number;