@truedat/core 4.41.1 → 4.41.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.41.2] 2022-03-30
4
+
5
+ ### Fixed
6
+
7
+ - [TD-4535] "Show more" on long Alert errors
8
+
3
9
  ## [4.40.10] 2022-03-21
4
10
 
5
11
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/core",
3
- "version": "4.41.1",
3
+ "version": "4.41.2",
4
4
  "description": "Truedat Web Core",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -32,7 +32,7 @@
32
32
  "@babel/plugin-transform-modules-commonjs": "^7.15.0",
33
33
  "@babel/preset-env": "^7.15.0",
34
34
  "@babel/preset-react": "^7.14.5",
35
- "@truedat/test": "4.41.1",
35
+ "@truedat/test": "4.41.2",
36
36
  "babel-jest": "^27.0.6",
37
37
  "babel-plugin-dynamic-import-node": "^2.3.3",
38
38
  "babel-plugin-lodash": "^3.3.4",
@@ -106,5 +106,5 @@
106
106
  "react-dom": ">= 16.8.6 < 17",
107
107
  "semantic-ui-react": ">= 0.88.2 < 2.1"
108
108
  },
109
- "gitHead": "6e19abfaa3541bfad20ea093e6666cbdbecf7b55"
109
+ "gitHead": "de1e8cd9c744c0dae85be4585fccc1c50fdf6a07"
110
110
  }
@@ -1,5 +1,5 @@
1
1
  import _ from "lodash/fp";
2
- import React, { useState } from "react";
2
+ import React, { useEffect, useState } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { useIntl } from "react-intl";
5
5
  import { connect } from "react-redux";
@@ -54,6 +54,10 @@ export const Alert = ({
54
54
  const list = _.isEmpty(errors) ? formattedMessages : errors;
55
55
  const [maxListItems, setMaxListItems] = useState(initialMaxListItems);
56
56
 
57
+ useEffect(() => {
58
+ setMaxListItems(initialMaxListItems);
59
+ }, [initialMaxListItems]);
60
+
57
61
  const message_content =
58
62
  content && !existingList(errors) && !existingList(formattedMessages)
59
63
  ? formatMessage(