@k-int/stripes-kint-components 2.7.0 → 2.7.1
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,3 +1,6 @@
|
|
|
1
|
+
## 2.7.1 2022-07-06
|
|
2
|
+
* Fixed bug where non-createable fields which were editable would display a field on creation.
|
|
3
|
+
|
|
1
4
|
## 2.7.0 2022-07-05
|
|
2
5
|
* Fixed missing translation issue
|
|
3
6
|
* EditableRefdataCategoryList component set up for ease of refdata category creation/deletion
|
|
@@ -358,7 +358,7 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
|
|
|
358
358
|
true => Field, false => display value
|
|
359
359
|
*/
|
|
360
360
|
|
|
361
|
-
if (!cd.id && createFunction(cd) || editFunction(cd)) {
|
|
361
|
+
if (!cd.id && createFunction(cd) || !!cd.id && editFunction(cd)) {
|
|
362
362
|
var validateFunction = validateFields !== null && validateFields !== void 0 && validateFields[key] ? validateFields === null || validateFields === void 0 ? void 0 : validateFields[key](cd) : null;
|
|
363
363
|
returnValue = fieldComponents[key] ? fieldComponents[key]({
|
|
364
364
|
name: "".concat(cd.fieldName, ".").concat(key)
|
package/package.json
CHANGED
|
@@ -277,7 +277,7 @@ const ActionListFieldArray = forwardRef(({
|
|
|
277
277
|
*/
|
|
278
278
|
if (
|
|
279
279
|
(!cd.id && createFunction(cd)) ||
|
|
280
|
-
(editFunction(cd))
|
|
280
|
+
(!!cd.id && editFunction(cd))
|
|
281
281
|
) {
|
|
282
282
|
const validateFunction = validateFields?.[key] ? validateFields?.[key](cd) : null;
|
|
283
283
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
A component designed to render a list of objects, along with actions for each item.
|
|
3
3
|
Special actions are reserved for `create` and `edit`. Currently `edit` can only deal with scalar properties.
|
|
4
4
|
|
|
5
|
+
It is assumed that a unique `id` is present on each object in the contentData, as this is used internally to work out when a row is being edited/created.
|
|
6
|
+
|
|
5
7
|
## Basic Usage
|
|
6
8
|
```
|
|
7
9
|
import { useState } from 'react';
|