vitmalina / w2ui

UI widgets for modern apps. Data table, forms, toolbars, sidebar, tabs, tooltips, popups. All under 120kb (gzipped).
http://w2ui.com
MIT License
2.63k stars 735 forks source link

w2ui grid - password renderer error if password undefined #2508

Closed ope-nz closed 3 months ago

ope-nz commented 3 months ago

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 commented 3 months ago

I have created a pull request

https://github.com/vitmalina/w2ui/pull/2509

ope-nz commented 3 months ago

I have created a pull request

https://github.com/vitmalina/w2ui/pull/2509