@refinedev/antd 5.5.0 → 5.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refinedev/antd",
3
- "version": "5.5.0",
3
+ "version": "5.5.2",
4
4
  "description": "refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -212,7 +212,10 @@ export const useDrawerForm = <
212
212
  if (typeof showId !== "undefined") {
213
213
  setId?.(showId);
214
214
  }
215
- if (typeof showId !== "undefined" || typeof id !== "undefined") {
215
+ const needsIdToOpen = action === "edit" || action === "clone";
216
+ const hasId =
217
+ typeof showId !== "undefined" || typeof id !== "undefined";
218
+ if (needsIdToOpen ? hasId : true) {
216
219
  show();
217
220
  }
218
221
  },
@@ -207,7 +207,10 @@ export const useModalForm = <
207
207
  if (typeof showId !== "undefined") {
208
208
  setId?.(showId);
209
209
  }
210
- if (typeof showId !== "undefined" || typeof id !== "undefined") {
210
+ const needsIdToOpen = action === "edit" || action === "clone";
211
+ const hasId =
212
+ typeof showId !== "undefined" || typeof id !== "undefined";
213
+ if (needsIdToOpen ? hasId : true) {
211
214
  sunflowerUseModal.show();
212
215
  }
213
216
  },