@icos-desktop/react-components 1.2.0-beta.8 → 1.2.0-beta.9

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.
@@ -1795,7 +1795,7 @@ var PersonSelector = function (props) {
1795
1795
  var handleCheckAll = function (e) {
1796
1796
  if (e.target.checked) {
1797
1797
  // 全选
1798
- setCheckedList(produce(function (draftState) {
1798
+ setCheckedList(produce(checkedList, function (draftState) {
1799
1799
  userList.forEach(function (item) {
1800
1800
  var index = draftState.findIndex(function (it) { return it.openUserId === item.openUserId; });
1801
1801
  if (index === -1) {
@@ -1806,7 +1806,7 @@ var PersonSelector = function (props) {
1806
1806
  }
1807
1807
  else {
1808
1808
  // 取消全选
1809
- setCheckedList(produce(function (draftState) {
1809
+ setCheckedList(produce(checkedList, function (draftState) {
1810
1810
  userList.forEach(function (item) {
1811
1811
  var index = draftState.findIndex(function (it) { return it.openUserId === item.openUserId; });
1812
1812
  if (index > -1) {
@@ -1822,13 +1822,13 @@ var PersonSelector = function (props) {
1822
1822
  var checkIndex = checkedList === null || checkedList === void 0 ? void 0 : checkedList.findIndex(function (it) { return item.openUserId === it.openUserId; });
1823
1823
  if (checkIndex > -1) {
1824
1824
  // 取消选中
1825
- setCheckedList(produce(function (draftState) {
1825
+ setCheckedList(produce(checkedList, function (draftState) {
1826
1826
  draftState.splice(checkIndex, 1);
1827
1827
  }));
1828
1828
  }
1829
1829
  else {
1830
1830
  // 选中
1831
- setCheckedList(produce(function (draftState) {
1831
+ setCheckedList(produce(checkedList, function (draftState) {
1832
1832
  draftState.push(item);
1833
1833
  }));
1834
1834
  }
@@ -1836,7 +1836,7 @@ var PersonSelector = function (props) {
1836
1836
  // 处理额外选项
1837
1837
  var handleChangeExtra = function (item) {
1838
1838
  return function (value) {
1839
- setCheckedList(produce(function (draftState) {
1839
+ setCheckedList(produce(checkedList, function (draftState) {
1840
1840
  var index = draftState.findIndex(function (it) { return it.openUserId === item.openUserId; });
1841
1841
  if (index > -1) {
1842
1842
  draftState[index][extraKey] = value;