Skip to content

Commit 8bc2819

Browse files
devversionmmalerba
authored andcommitted
docs(material/autocomplete): add descriptions for properties showing up in API docs (#22851)
Currently the `options` and `optionGroups` properties are showing up in the docs even though they are marked as `@docs-private` in the base class. This happens because they are declared in the derived autocomplete implementations (both non-MDC and MDC). Given these properties not being prefixed with an underscore anyway, we should start documenting these. (cherry picked from commit bf22776)
1 parent 2895bd3 commit 8bc2819

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/material-experimental/mdc-autocomplete/autocomplete.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ import {panelAnimation} from './animations';
3939
animations: [panelAnimation],
4040
})
4141
export class MatAutocomplete extends _MatAutocompleteBase {
42+
/** Reference to all option groups within the autocomplete. */
4243
@ContentChildren(MAT_OPTGROUP, {descendants: true}) optionGroups: QueryList<MatOptgroup>;
44+
/** Reference to all options within the autocomplete. */
4345
@ContentChildren(MatOption, {descendants: true}) options: QueryList<MatOption>;
4446
protected _visibleClass = 'mat-mdc-autocomplete-visible';
4547
protected _hiddenClass = 'mat-mdc-autocomplete-hidden';

src/material/autocomplete/autocomplete.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ export abstract class _MatAutocompleteBase extends _MatAutocompleteMixinBase imp
125125
/** Element for the panel containing the autocomplete options. */
126126
@ViewChild('panel') panel: ElementRef;
127127

128-
/** @docs-private */
128+
/** Reference to all options within the autocomplete. */
129129
abstract options: QueryList<_MatOptionBase>;
130130

131-
/** @docs-private */
131+
/** Reference to all option groups within the autocomplete. */
132132
abstract optionGroups: QueryList<_MatOptgroupBase>;
133133

134134
/** Aria label of the autocomplete. */
@@ -294,7 +294,9 @@ export abstract class _MatAutocompleteBase extends _MatAutocompleteMixinBase imp
294294
]
295295
})
296296
export class MatAutocomplete extends _MatAutocompleteBase {
297+
/** Reference to all option groups within the autocomplete. */
297298
@ContentChildren(MAT_OPTGROUP, {descendants: true}) optionGroups: QueryList<MatOptgroup>;
299+
/** Reference to all options within the autocomplete. */
298300
@ContentChildren(MatOption, {descendants: true}) options: QueryList<MatOption>;
299301
protected _visibleClass = 'mat-autocomplete-visible';
300302
protected _hiddenClass = 'mat-autocomplete-hidden';

0 commit comments

Comments
 (0)