Skip to content

feat: make CInput events transparent #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

bastianjoel
Copy link

@bastianjoel bastianjoel commented Jan 24, 2020

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch (or to a previous version branch), not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
This PR makes the events of the native input element accessible via the CInput component.

@woothu
Copy link

woothu commented Jan 24, 2020

Hi! Thank you for submitting this interesting idea!

What events besides 'input' and 'change' are useful in your opinion? (Use cases)

@bastianjoel
Copy link
Author

@woothu I'm using the blur and keypress.enter event very often to save single-input forms for example.

Bootstrap-Vue uses this technique btw for their inputs too. (https://github.com/bootstrap-vue/bootstrap-vue/blob/bba1dc80bec6922d42e0ec43fa17f1a29013ef0f/src/components/form-input/form-input.js#L159)

@woothu woothu merged commit 41cafc2 into coreui:dev Jan 27, 2020
@woothu
Copy link

woothu commented Jan 27, 2020

It seems like a useful feature. Thank you for contributing!

I have added this feature also in other form components 97085df

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