@abtnode/ux 1.17.0 → 1.17.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.
@@ -212,9 +212,11 @@ export default function InviteDialog() {
212
212
  "data-cy": "invite-org-select-users",
213
213
  loading: loadingMore,
214
214
  disabled: loading,
215
- getOptionLabel: option => `${option.fullName || option.name || ''} ${option.email || ''}`,
215
+ getOptionLabel: option => `${option.fullName || option.name || option.did || ''}`,
216
216
  isOptionEqualToValue: (option, value) => option.did === value.did,
217
+ filterOptions: options => options,
217
218
  value: selectedUsers,
219
+ inputValue: searchText,
218
220
  onChange: (_, newValue, reason, details) => {
219
221
  // 支持 toggle 选择:重复点击已选中的选项会取消选中
220
222
  if (reason === 'selectOption') {
@@ -227,15 +229,22 @@ export default function InviteDialog() {
227
229
  // 如果未选中,则添加
228
230
  setSelectedUsers(prev => [...prev, clickedUser]);
229
231
  }
232
+ // 选中/取消选中后清空搜索条件
233
+ setSearchText('');
230
234
  } else {
231
- // 其他情况(如删除芯片)保持默认行为
235
+ // 其他情况(如删除 chip)保持默认行为
232
236
  setSelectedUsers(newValue);
233
237
  }
234
238
  },
235
- onInputChange: (_, newInputValue) => {
236
- if (newInputValue !== searchText) {
239
+ onInputChange: (_, newInputValue, reason) => {
240
+ // 只在用户输入时更新搜索文本
241
+ if (reason === 'input') {
237
242
  setSearchText(newInputValue);
243
+ } else if (reason === 'clear') {
244
+ // 点击清空按钮时清空搜索文本
245
+ setSearchText('');
238
246
  }
247
+ // reason === 'reset' 时不做处理,保持当前搜索文本
239
248
  },
240
249
  renderInput: params => /*#__PURE__*/_jsx(TextField, {
241
250
  ...params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.17.0",
3
+ "version": "1.17.1",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,33 +23,33 @@
23
23
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@abtnode/auth": "1.17.0",
27
- "@abtnode/constant": "1.17.0",
28
- "@abtnode/docker-utils": "1.17.0",
29
- "@abtnode/util": "1.17.0",
26
+ "@abtnode/auth": "1.17.1",
27
+ "@abtnode/constant": "1.17.1",
28
+ "@abtnode/docker-utils": "1.17.1",
29
+ "@abtnode/util": "1.17.1",
30
30
  "@ahooksjs/use-url-state": "^3.5.1",
31
- "@arcblock/did": "^1.27.2",
32
- "@arcblock/did-connect-react": "^3.1.60",
33
- "@arcblock/did-ext": "^1.27.2",
31
+ "@arcblock/did": "^1.27.3",
32
+ "@arcblock/did-connect-react": "^3.2.0",
33
+ "@arcblock/did-ext": "^1.27.3",
34
34
  "@arcblock/did-motif": "^1.1.14",
35
- "@arcblock/icons": "^3.1.60",
36
- "@arcblock/nft-display": "^3.1.60",
37
- "@arcblock/react-hooks": "^3.1.60",
38
- "@arcblock/terminal": "^3.1.60",
39
- "@arcblock/ux": "^3.1.60",
40
- "@arcblock/validator": "^1.27.2",
41
- "@blocklet/aigne-hub": "^0.5.12",
42
- "@blocklet/constant": "1.17.0",
43
- "@blocklet/did-domain-react": "^0.6.3",
35
+ "@arcblock/icons": "^3.2.0",
36
+ "@arcblock/nft-display": "^3.2.0",
37
+ "@arcblock/react-hooks": "^3.2.0",
38
+ "@arcblock/terminal": "^3.2.0",
39
+ "@arcblock/ux": "^3.2.0",
40
+ "@arcblock/validator": "^1.27.3",
41
+ "@blocklet/aigne-hub": "^0.6.0",
42
+ "@blocklet/constant": "1.17.1",
43
+ "@blocklet/did-domain-react": "^0.6.4",
44
44
  "@blocklet/did-space-react": "^1.2.1",
45
- "@blocklet/error": "^0.3.1",
46
- "@blocklet/js-sdk": "1.17.0",
47
- "@blocklet/launcher-layout": "^3.1.60",
48
- "@blocklet/list": "^0.18.2",
49
- "@blocklet/meta": "1.17.0",
50
- "@blocklet/theme": "^3.1.60",
51
- "@blocklet/ui-react": "^3.1.60",
52
- "@blocklet/uploader": "^0.3.5",
45
+ "@blocklet/error": "^0.3.2",
46
+ "@blocklet/js-sdk": "1.17.1",
47
+ "@blocklet/launcher-layout": "^3.2.0",
48
+ "@blocklet/list": "^0.18.3",
49
+ "@blocklet/meta": "1.17.1",
50
+ "@blocklet/theme": "^3.2.0",
51
+ "@blocklet/ui-react": "^3.2.0",
52
+ "@blocklet/uploader": "^0.3.7",
53
53
  "@emotion/react": "^11.14.0",
54
54
  "@emotion/styled": "^11.14.1",
55
55
  "@iconify-icons/material-symbols": "^1.2.58",
@@ -61,9 +61,9 @@
61
61
  "@mui/material": "^7.2.0",
62
62
  "@mui/x-date-pickers": "^8.9.0",
63
63
  "@mui/x-tree-view": "^8.9.0",
64
- "@ocap/client": "^1.27.2",
65
- "@ocap/mcrypto": "^1.27.2",
66
- "@ocap/util": "^1.27.2",
64
+ "@ocap/client": "^1.27.3",
65
+ "@ocap/mcrypto": "^1.27.3",
66
+ "@ocap/util": "^1.27.3",
67
67
  "@uiw/react-markdown-preview": "^5.1.1",
68
68
  "ahooks": "^3.7.8",
69
69
  "axios": "^1.7.9",
@@ -127,5 +127,5 @@
127
127
  "babel-plugin-inline-react-svg": "^2.0.2",
128
128
  "glob": "^10.4.1"
129
129
  },
130
- "gitHead": "becc75459ae8e1f1ba3042cf7e9a0cc45284bdd2"
130
+ "gitHead": "0d57fbc64a22fd09267166b26af46dd84e545287"
131
131
  }