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

w2ui grid - password renderer error if password undefined #2508

Closed
ope-nz opened this issue Mar 25, 2024 · 2 comments
Closed

w2ui grid - password renderer error if password undefined #2508

ope-nz opened this issue Mar 25, 2024 · 2 comments

Comments

@ope-nz
Copy link
Contributor

ope-nz commented Mar 25, 2024

Hello, when inserting a new row into the grid (without a template) the password renderer is throwing an error as the value is "undefined"

What is current behavior
The error below is thrown if the value is undefined and the new row is not added.

image

What is desired behavior
The password renderer should be blank until the password value is set.

Link to jsfidle/codepen with sample code
https://jsfiddle.net/xw0Lznch/

Steps to reproduce or sample
See console output in codepen

Proposed fix

In w2utils.js update 'password' renderer to;

'password'(value, params) {
let ret = ''
if (!value) return ret;
for (let i = 0; i < value.length; i++) {
ret += '*'
}
return ret
}

@ope-nz
Copy link
Contributor Author

ope-nz commented Mar 26, 2024

I have created a pull request

#2509

@ope-nz ope-nz closed this as completed Mar 26, 2024
@ope-nz
Copy link
Contributor Author

ope-nz commented Mar 26, 2024

I have created a pull request

#2509

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

No branches or pull requests

1 participant