Skip to content

feat(core)- Added native change event to input components.#2355

Open
1307-Dev wants to merge 11 commits intosiemens:mainfrom
1307-Dev:ix-2551/change
Open

feat(core)- Added native change event to input components.#2355
1307-Dev wants to merge 11 commits intosiemens:mainfrom
1307-Dev:ix-2551/change

Conversation

@1307-Dev
Copy link
Collaborator

💡 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):

  • 🦮 Accessibility (a11y) features were implemented
  • 🗺️ Internationalization (i18n) - no hard coded strings
  • 📲 Responsiveness - components handle viewport changes and content overflow gracefully
  • 📕 Add or update a Storybook story
  • 📄 Documentation was reviewed/updated siemens/ix-docs
  • 🧪 Unit tests were added/updated and pass (pnpm test)
  • 📸 Visual regression tests were added/updated and pass (Guide)
  • 🧐 Static code analysis passes (pnpm lint)
  • 🏗️ Successful compilation (pnpm build, changes pushed)

👨‍💻 Help & support

@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2026

🦋 Changeset detected

Latest commit: 883c7e7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@siemens/ix-angular Patch
@siemens/ix Patch
@siemens/ix-react Patch
@siemens/ix-vue Patch
@siemens/ix-docs Patch

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

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 ixChange event across several input components. This event provides a standardized and predictable mechanism for applications to react to committed value changes, such as when a user finishes typing and blurs an input, presses Enter, or selects a value from a picker. This enhancement significantly improves the consistency and reliability of event handling for these interactive elements.

Highlights

  • New ixChange Event: A native-like ixChange event has been introduced for ix-input, ix-textarea, ix-number-input, ix-date-input, and ix-time-input components to provide consistent change detection.
  • Event Triggering Logic: The ixChange event now fires when an input component loses focus and its value has changed, when the Enter key is pressed (for single-line inputs) after a value change, or upon selection from a date/time picker.
  • Framework Integration: The new ixChange event is properly exposed and typed across Angular, React, and Vue wrappers, ensuring seamless integration for developers using these frameworks.
  • Comprehensive Testing: Extensive Playwright component tests have been added to validate the behavior of the ixChange event under various scenarios, including blur, Enter key, picker selection, programmatic changes, and disabled/readonly states.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@1307-Dev 1307-Dev marked this pull request as ready for review January 22, 2026 07:01
Copy link
Collaborator

@nuke-ellington nuke-ellington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since tags missing

}

private handleInputKeyDown(event: KeyboardEvent) {
if (event.key === 'Enter' && this.initialValue !== this.value) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use onEnterKeyChange?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the change

onKeyDown={(event) => this.handleKeyDown(event)}
onBeforeInput={(event) => this.handleBeforeInput(event)}
onPaste={(event) => this.handlePaste(event)}
onFocus={this.handleFocus}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to extract this oneliner

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the change

private disposableChangesAndVisibilityObservers?: DisposableChangesAndVisibilityObservers;

private handleInputKeyDown(event: KeyboardEvent) {
if (event.key === 'Enter' && this.initialValue !== this.value) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use onEnterKeyChange?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the change

onBlur={() => {
this.ixBlur.emit();
this.touched = true;
if (this.initialValue !== this.value) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use onInputBlurWithChange?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the change

Copy link
Collaborator

@nuke-ellington nuke-ellington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since tag syntax does not use prefixed 'v's (since v4.4.0 -> since 4.4.0)

@nuke-ellington nuke-ellington added this to the 4.4.0 milestone Feb 4, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants