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

input id attribute in AlertController is ommited #10603

Closed
mradosta opened this issue Mar 1, 2017 · 2 comments
Closed

input id attribute in AlertController is ommited #10603

mradosta opened this issue Mar 1, 2017 · 2 comments
Assignees
Milestone

Comments

@mradosta
Copy link

mradosta commented Mar 1, 2017

Ionic version: (check one with "x")
[ ] 1.x
[x ] 2.x

I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
Adding the "id" attribute to the inputs array of the AlertController, when rendered, this attribute is not in the DOM

inputs: [
      {
        id: 'username',
        name: 'username',
        placeholder: 'Username'
      }
]

Expected behavior:

<input id="username" ......>

Steps to reproduce:

presentPrompt() {
  let alert = this.alertCtrl.create({
    title: 'Login',
    inputs: [
      {
        id: 'username',
        name: 'username',
        placeholder: 'Username'
      },
      {
        name: 'password',
        placeholder: 'Password',
        type: 'password'
      }
    ],
    buttons: [
      {
        text: 'Cancel',
        role: 'cancel',
        handler: data => {
          console.log('Cancel clicked');
        }
      },
      {
        text: 'Login',
        handler: data => {
          if (User.isValid(data.username, data.password)) {
            // logged in!
          } else {
            // invalid login
            return false;
          }
        }
      }
    ]
  });
  alert.present();
}
@jgw96
Copy link
Contributor

jgw96 commented Mar 1, 2017

Thanks, we will look into this.

@jgw96 jgw96 added the v2 label Mar 1, 2017
@manucorporat manucorporat added this to the 2.3.0 milestone Mar 4, 2017
@manucorporat manucorporat self-assigned this Mar 15, 2017
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 3, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants