@blocklet/discuss-kit 1.0.62 → 1.0.64

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.
@@ -158,7 +158,10 @@ function DiscussKitComments({
158
158
  } = context.useLocaleContext();
159
159
  const objectRatingState = useAsyncRetry__default.default(() => api.fetchRatingStats(object.id));
160
160
  const handlers = {
161
- ADD_COMMENT: (data) => add(formatComment(data)),
161
+ ADD_COMMENT: (data) => {
162
+ add(formatComment(data));
163
+ onChange == null ? void 0 : onChange();
164
+ },
162
165
  RATING: () => objectRatingState.retry(),
163
166
  RATING_COMMENT: async ({
164
167
  commentId
@@ -188,7 +191,6 @@ function DiscussKitComments({
188
191
  object
189
192
  });
190
193
  add(formatComment(data));
191
- onChange();
192
194
  };
193
195
  const handleOnRate = async ({
194
196
  ratingType,
@@ -145,7 +145,10 @@ function DiscussKitComments({
145
145
  } = useLocaleContext();
146
146
  const objectRatingState = useAsyncRetry(() => fetchRatingStats(object.id));
147
147
  const handlers = {
148
- ADD_COMMENT: (data) => add(formatComment(data)),
148
+ ADD_COMMENT: (data) => {
149
+ add(formatComment(data));
150
+ onChange == null ? void 0 : onChange();
151
+ },
149
152
  RATING: () => objectRatingState.retry(),
150
153
  RATING_COMMENT: async ({
151
154
  commentId
@@ -175,7 +178,6 @@ function DiscussKitComments({
175
178
  object
176
179
  });
177
180
  add(formatComment(data));
178
- onChange();
179
181
  };
180
182
  const handleOnRate = async ({
181
183
  ratingType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
4
4
  "description": "A react component for Discuss Kit blocklet.",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/es/index.js",
@@ -34,11 +34,11 @@
34
34
  "author": "Nate <nate@arcblock.io> (http://github.com/NateRobinson)",
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
- "@arcblock/did-connect": "^2.4.67",
38
- "@arcblock/ux": "^2.4.67",
37
+ "@arcblock/did-connect": "^2.4.69",
38
+ "@arcblock/ux": "^2.4.69",
39
39
  "@arcblock/ws": "^1.18.39",
40
- "@blocklet/discuss-kit-ux": "1.0.62",
41
- "@blocklet/editor": "1.0.62",
40
+ "@blocklet/discuss-kit-ux": "1.0.64",
41
+ "@blocklet/editor": "1.0.64",
42
42
  "@emotion/react": "^11.10.5",
43
43
  "@emotion/styled": "^11.10.5",
44
44
  "@mui/icons-material": "^5.10.9",
@@ -77,5 +77,5 @@
77
77
  "vite-plugin-build": "^0.6.0",
78
78
  "vite-plugin-svgr": "^2.2.2"
79
79
  },
80
- "gitHead": "1295eef1298e9946c459e710f3e8894efbab869a"
80
+ "gitHead": "d9c94e9a8784343794478043e25cf0957f46525f"
81
81
  }