@innoways/drip-form-theme-antd 8.0.13 → 8.0.14

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,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 8.0.14
4
+
5
+ ### Patch Changes
6
+
7
+ - fix checkbox field not checked issue
8
+ - Updated dependencies
9
+ - @innoways/hooks@8.0.14
10
+ - @innoways/utils@8.0.14
11
+
3
12
  ## 8.0.13
4
13
 
5
14
  ### Patch Changes
package/dist/index.js CHANGED
@@ -21210,7 +21210,7 @@ var lodash = createCommonjsModule(function (module, exports) {
21210
21210
  // Export to the global object.
21211
21211
  root._ = _
21212
21212
  }
21213
- }).call(commonjsGlobal)
21213
+ }.call(commonjsGlobal))
21214
21214
  })
21215
21215
 
21216
21216
  /**
@@ -26049,6 +26049,13 @@ var CheckboxField = function CheckboxField(_ref) {
26049
26049
  } else {
26050
26050
  _onChange(checkedValues)
26051
26051
  }
26052
+ } // Filter fieldData to only include primitive values for Checkbox.Group
26053
+
26054
+ var getCheckboxGroupValue = function getCheckboxGroupValue() {
26055
+ if (!Array.isArray(fieldData)) return []
26056
+ return fieldData.filter(function (item) {
26057
+ return typeCheck(item) !== 'Object'
26058
+ })
26052
26059
  }
26053
26060
 
26054
26061
  var renderOptions = function renderOptions(options) {
@@ -26151,7 +26158,7 @@ var CheckboxField = function CheckboxField(_ref) {
26151
26158
  _Checkbox,
26152
26159
  _extends(
26153
26160
  {
26154
- value: fieldData,
26161
+ checked: fieldData,
26155
26162
  onChange: function onChange(e) {
26156
26163
  var _e$target
26157
26164
 
@@ -26195,7 +26202,7 @@ var CheckboxField = function CheckboxField(_ref) {
26195
26202
  _Checkbox.Group,
26196
26203
  _extends(
26197
26204
  {
26198
- value: fieldData,
26205
+ value: getCheckboxGroupValue(),
26199
26206
  onChange: _onChange,
26200
26207
  },
26201
26208
  restProps
@@ -26207,7 +26214,7 @@ var CheckboxField = function CheckboxField(_ref) {
26207
26214
  _Checkbox.Group,
26208
26215
  _extends(
26209
26216
  {
26210
- value: fieldData,
26217
+ value: getCheckboxGroupValue(),
26211
26218
  onChange: function onChange(e) {
26212
26219
  return handleGroupChange(e)
26213
26220
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innoways/drip-form-theme-antd",
3
- "version": "8.0.13",
3
+ "version": "8.0.14",
4
4
  "author": "JDFED",
5
5
  "description": "drip-form antd主题包",
6
6
  "main": "dist/index.js",
@@ -31,8 +31,8 @@
31
31
  "dependencies": {
32
32
  "@ant-design/icons": "^4.7.0",
33
33
  "@babel/runtime": "^7.10.2",
34
- "@innoways/hooks": "^8.0.13",
35
- "@innoways/utils": "^8.0.13",
34
+ "@innoways/hooks": "^8.0.14",
35
+ "@innoways/utils": "^8.0.14",
36
36
  "antd": "^4.16.13",
37
37
  "flatpickr": "^4.6.13",
38
38
  "moment": "^2.26.0",