Skip to content

Commit

Permalink
Support textarea change events for report options (senaite#127)
Browse files Browse the repository at this point in the history
* Handle change events for report options textfields

* Production JS

* Changelog updated
  • Loading branch information
ramonski authored Oct 25, 2022
1 parent 257a092 commit 3bbd7e0
Show file tree
Hide file tree
Showing 6 changed files with 515 additions and 1,475 deletions.
2 changes: 1 addition & 1 deletion docs/Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
2.4.0 (unreleased)
------------------

- no changes yet
- #127 Support textarea change events for report options


2.3.0 (2022-10-03)
Expand Down
3 changes: 1 addition & 2 deletions src/senaite/impress/static/bundles/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/senaite/impress/static/bundles/main.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions webpack/app/components/ReportOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ class ReportOptions extends React.Component {
node.addEventListener("change", this.props.onChange);
}

// Bind change event to textarea fields
controls = form.context.getElementsByTagName("textarea");
for (let [index, node] of Object.entries(controls)) {
node.addEventListener("change", this.props.onChange);
}

// Bind change event to select fields
controls = form.context.getElementsByTagName("select");
for (let [index, node] of Object.entries(controls)) {
Expand Down
2 changes: 1 addition & 1 deletion webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"css-loader": "^5.0.1",
"html-webpack-plugin": "^4.5.1",
"mini-css-extract-plugin": "^1.3.3",
"node-sass": "^5.0.0",
"node-sass": "npm:sass@^1.55.0",
"sass-loader": "^10.1.0",
"style-loader": "^2.0.0",
"webpack": "^5.11.1",
Expand Down
Loading

0 comments on commit 3bbd7e0

Please sign in to comment.