Skip to content
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

#360250: add pin element #104

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

Sophiaw-hub
Copy link
Collaborator

@Sophiaw-hub Sophiaw-hub commented Apr 15, 2024

  • Das Pin-Element befindet sich bereits in einem Formular und muss nicht extra in eins gezogen werden. Denn der Use Case benötigt in der Regel für die Pin-Eingabe nur das zugehörige Element und ggf. noch ein Textfeld.
  • Bei der Eingabe werden nur Zahlen zugelassen.
  • Es wird validiert, ob das Element befüllt ist.
  • Über Style Configs kann eingestellt werden, ob das Formular automatisch abgeschickt werden soll.
  • Über Style Configs kann eingestellt werden, ob die Pin-Elemente mit einer Nummer gelabelt werden sollen.

Bumps [intl-tel-input](https://github.com/jackocnr/intl-tel-input) from 19.5.7 to 21.2.7.
- [Release notes](https://github.com/jackocnr/intl-tel-input/releases)
- [Changelog](https://github.com/jackocnr/intl-tel-input/blob/master/CHANGELOG.md)
- [Commits](jackocnr/intl-tel-input@v19.5.7...v21.2.7)

---
updated-dependencies:
- dependency-name: intl-tel-input
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Copy link
Contributor

@derB4 derB4 left a comment

Choose a reason for hiding this comment

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

Sieht insgesamt schon sehr gut aus, aber ich hab immer was zu meckern

configs/styles/pin-auto-submit.js Outdated Show resolved Hide resolved
content-elements/form/form-pin/form-pin.js Outdated Show resolved Hide resolved
content-elements/form/form-pin/form-pin.js Outdated Show resolved Hide resolved
inputPin.setAttribute('inputmode', 'numeric');
inputPin.setAttribute('pattern', "[0-9]");

inputPin.addEventListener('focusin', (e) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Event Listener kannst du auch mit setAttribute('@focusin', 'myAlpineFunction') registrieren

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ich bekomme das auf diesen Weg leider nicht hin. Generell, sobald ich versuche, die Methode auszulagern. Wird das Event nicht mehr erkannt.

content-elements/form/form-pin/form-pin.js Outdated Show resolved Hide resolved
content-elements/form/form-pin/form-pin.js Outdated Show resolved Hide resolved
},

_cleanUp() {
// TODO: auch im DOM lösbar?
Copy link
Contributor

Choose a reason for hiding this comment

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

Sehr gute Idee!
Wenn du nur Nummern willst: <input type="number">
Nur eine Zahl: <input min="0" max="9">
Min eine Zahl: <input required>

ich denke, das sollte das hier abdecken

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Das Einsetzten von größeren Zahlen als 9 konnte ich nicht über min/max verhindern. Aber das Einsetzen von Buchstaben. Dadurch ist _cleanUp() auf jeden Fall kürzer geworden.

content-elements/layout/col-one/index.js Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Das muss ich mir nochmal in Ruhe anschauen 😅

@Sophiaw-hub Sophiaw-hub changed the title add pin element plus container add pin element Apr 29, 2024
@innerjoin innerjoin changed the title add pin element #360250: add pin element May 16, 2024
@Sophiaw-hub Sophiaw-hub closed this Oct 8, 2024
@Sophiaw-hub Sophiaw-hub reopened this Oct 8, 2024
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