Skip to content

Commit

Permalink
fix(material/timepicker): make disabled input public (#30063)
Browse files Browse the repository at this point in the history
Initially the `disabled` input was marked as `protected`, because the actual disabled state is a `computed`. This seems to break with some compiler options so these changes switches it to be public.

Fixes #30061.

(cherry picked from commit d6b3775)
  • Loading branch information
crisbeto committed Nov 22, 2024
1 parent f251e2b commit a312014
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/material/timepicker/timepicker-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,11 @@ export class MatTimepickerInput<D> implements ControlValueAccessor, Validator, O
() => this.disabledInput() || this._accessorDisabled(),
);

/** Whether the input should be disabled through the template. */
protected readonly disabledInput: InputSignalWithTransform<boolean, unknown> = input(false, {
/**
* Whether the input should be disabled through the template.
* @docs-private
*/
readonly disabledInput: InputSignalWithTransform<boolean, unknown> = input(false, {
transform: booleanAttribute,
alias: 'disabled',
});
Expand Down
2 changes: 1 addition & 1 deletion tools/public_api_guard/material/timepicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class MatTimepickerInput<D> implements ControlValueAccessor, Validator, O
protected readonly _ariaControls: Signal<string | null>;
protected readonly _ariaExpanded: Signal<string>;
readonly disabled: Signal<boolean>;
protected readonly disabledInput: InputSignalWithTransform<boolean, unknown>;
readonly disabledInput: InputSignalWithTransform<boolean, unknown>;
focus(): void;
_getLabelId(): string | null;
getOverlayOrigin(): ElementRef<HTMLElement>;
Expand Down

0 comments on commit a312014

Please sign in to comment.