Indicia-Team / media

Shared library of JavaScript code,
0 stars 2 forks source link

Default report grid parameters override values from Auto Params Form #10

Closed JimBacon closed 5 years ago

JimBacon commented 5 years ago

When a report grid is created with client_helpers/report_helper/report_grid() it is Ajaxified by media/jquery.reportgrid.js. Initial values for report parameters can be supplied in the paramDefaults option of report_grid() These are passed to JavaScript in the extraParams option. These parameters will be shown in an Auto Params Form to allow the user to change their values. When an Ajax reload is performed the initial values override the user values so the user input has no effect.

JimBacon commented 5 years ago

There is also an issue retrieving the input value. $(input).attr('value') might have worked on selects with jQuery < 1.6 but does not work with more recent versions. $(input).val() should be compatible with all versions and simple inputs.