JSON to CSV 1.0.1
Widget version: 1.0.1 (same as this GitHub release tag)
Compatibility
- Mendix Studio Pro 10.24.17
- Built with
@mendix/pluggable-widgets-tools10.16.0 - Works in the Mendix 10 React client
New
- Preview before download: file name, row and column count and delimiter; a Table tab with paging and a CSV tab showing exactly the text that will be downloaded, with Copy CSV; Hide/Show preview.
- Delimiter selection: a dropdown next to the button with Semicolon, Comma, Tab, Pipe or Other… It starts with the delimiter attribute, or
;when that is empty. - Clear messages for loading, no data, invalid JSON and JSON that is not an array, plus a warning when
headersdoes not match the number of columns. - The Download Data button uses your theme's primary button style; the widget's Class and Style settings are applied.
- New properties: Allow delimiter selection, Show preview and Rows per page (all optional).
Fixed
- The delimiter attribute is used (1.0.0 read it from the filename attribute).
- With empty headers, the JSON keys are used as column names (1.0.0 wrote a blank first line).
- With empty data the button is disabled (1.0.0 downloaded hard-coded demo rows).
- Invalid JSON shows a message instead of crashing the widget.
- No more "require is not defined" error in the React client.
Install / upgrade
Download mendix.JSONtoCSV.mpk from this release, put it in your app's widgets folder and press F4 in Studio Pro. When upgrading from 1.0.0, choose Update all widgets when Studio Pro reports that the widget definition has changed.
Sample module
JSONtoCSVDemo.mpk (Studio Pro 10.24.17): an example page, JSONtoCSVDemo.Home_Web, with test data and the 1.0.1 widget. Import it with App > Import module package.
Previous version
- Version1.0.0 — Mendix 9.24.18, widget 1.0.0