feat(core)- Added native change event to input components.#2355
feat(core)- Added native change event to input components.#23551307-Dev wants to merge 11 commits intosiemens:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 883c7e7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Summary of ChangesHello @1307-Dev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a long-standing need by introducing a new Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new ixChange event to several input components, aiming to replicate the behavior of the native HTML change event. The implementation is consistent across input, textarea, number-input, date-input, and time-input components. The changes span the core component logic, framework wrappers for Angular, React, and Vue, and include a comprehensive set of end-to-end tests, which is excellent.
The overall implementation is solid. I've made a few suggestions to improve encapsulation by marking a new internal property as /** @internal */. This will prevent it from being part of the public API and avoid potential misuse.
nuke-ellington
left a comment
There was a problem hiding this comment.
Since tags missing
| } | ||
|
|
||
| private handleInputKeyDown(event: KeyboardEvent) { | ||
| if (event.key === 'Enter' && this.initialValue !== this.value) { |
There was a problem hiding this comment.
Use onEnterKeyChange?
| onKeyDown={(event) => this.handleKeyDown(event)} | ||
| onBeforeInput={(event) => this.handleBeforeInput(event)} | ||
| onPaste={(event) => this.handlePaste(event)} | ||
| onFocus={this.handleFocus} |
There was a problem hiding this comment.
No need to extract this oneliner
| private disposableChangesAndVisibilityObservers?: DisposableChangesAndVisibilityObservers; | ||
|
|
||
| private handleInputKeyDown(event: KeyboardEvent) { | ||
| if (event.key === 'Enter' && this.initialValue !== this.value) { |
There was a problem hiding this comment.
Use onEnterKeyChange?
| onBlur={() => { | ||
| this.ixBlur.emit(); | ||
| this.touched = true; | ||
| if (this.initialValue !== this.value) { |
There was a problem hiding this comment.
Use onInputBlurWithChange?
…ix-2551/change
nuke-ellington
left a comment
There was a problem hiding this comment.
since tag syntax does not use prefixed 'v's (since v4.4.0 -> since 4.4.0)
|



💡 What is the current behavior?
There is no event in ix-input which behaves like the native html change event.
GitHub Issue Number: #1811
🆕 What is the new behavior?
An ix-change event has been added to the input components. (input, textarea, number-input, date-input and time-input.)
This behaves just like the native change event.
🏁 Checklist
A pull request can only be merged if all of these conditions are met (where applicable):
pnpm test)pnpm lint)pnpm build, changes pushed)👨💻 Help & support