Skip to content

Commit 23321f7

Browse files
authored
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: #29374 (comment)
1 parent 3a10821 commit 23321f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/components/input/input.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ export class Input implements ComponentInterface {
366366
* such as [type] in Angular.
367367
*/
368368
this.onTypeChange();
369+
this.debounceChanged();
369370
}
370371

371372
componentDidRender() {

0 commit comments

Comments
 (0)