fix(input): debounce is set with binding syntax in angular on load (#29377)

Issue number: resolves #29374

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

When using Angular binding syntax, the `debounce` value can be set after
`connectedCallback`, but before `componentDidLoad`. This results in the
internal representation of the `debounce` value to be the default and
the watch callback to never fire.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- The callback handler for `debounce` is called on component load,
identical to what we do for the same exact reasons for the input `type`.
- `debounce` will correctly reflect and apply the developers value when
using binding syntax on initial load

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev-build: `8.0.1-dev.11713879639.102f51a0`

Forked reproduction with the dev-build is available here:
https://github.com/ionic-team/ionic-framework/issues/29374#issuecomment-2072377087
This commit is contained in:
Sean Perkins
2024-04-23 15:50:47 -04:00
committed by GitHub
parent 3a10821217
commit 23321f7ab2

View File

@ -366,6 +366,7 @@ export class Input implements ComponentInterface {
* such as [type] in Angular.
*/
this.onTypeChange();
this.debounceChanged();
}
componentDidRender() {