Skip to content

Commit bf22776

Browse files
authored
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.
1 parent 0c33b2e commit bf22776

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
@@ -122,10 +122,10 @@ export abstract class _MatAutocompleteBase extends _MatAutocompleteMixinBase imp
122122
/** Element for the panel containing the autocomplete options. */
123123
@ViewChild('panel') panel: ElementRef;
124124

125-
/** @docs-private */
125+
/** Reference to all options within the autocomplete. */
126126
abstract options: QueryList<_MatOptionBase>;
127127

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

131131
/** Aria label of the autocomplete. */
@@ -291,7 +291,9 @@ export abstract class _MatAutocompleteBase extends _MatAutocompleteMixinBase imp
291291
]
292292
})
293293
export class MatAutocomplete extends _MatAutocompleteBase {
294+
/** Reference to all option groups within the autocomplete. */
294295
@ContentChildren(MAT_OPTGROUP, {descendants: true}) optionGroups: QueryList<MatOptgroup>;
296+
/** Reference to all options within the autocomplete. */
295297
@ContentChildren(MatOption, {descendants: true}) options: QueryList<MatOption>;
296298
protected _visibleClass = 'mat-autocomplete-visible';
297299
protected _hiddenClass = 'mat-autocomplete-hidden';

0 commit comments

Comments
 (0)