You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Feature Request
It is necessary to add special attributes such as maxLength, inputmode, pattern, id etc. on inputs while using AlertController.
Describe Preferred Solution
Have new options for inputs to set custom attributes while creating alerts;
alert.present().then(v => {
let input = (document.querySelector('ion-alert input') as any);
if (input) {
input.setAttribute('maxlength','4');
input.setAttribute('inputmode','numeric');
...
}
});
However, this is just a hacky workaround and it gets complicated really quickly with multiple inputs. I think Ionic team should include a feature to add custom attributes and other native HTML5 features for inputs.
The text was updated successfully, but these errors were encountered:
Oh okay. Sorry for the duplicate. I was working on this issue/improvement for some time. I checked when I started but I didn't re-check when I created the issue.
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.
Feature Request
Ionic version:
[x] 5.x
Describe the Feature Request
It is necessary to add special attributes such as maxLength, inputmode, pattern, id etc. on inputs while using AlertController.
Describe Preferred Solution
Have new options for inputs to set custom attributes while creating alerts;
Describe Alternatives
However, this is just a hacky workaround and it gets complicated really quickly with multiple inputs. I think Ionic team should include a feature to add custom attributes and other native HTML5 features for inputs.
The text was updated successfully, but these errors were encountered: