@thefreshop/tb 1.0.19 → 1.0.21

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.
@@ -8,6 +8,7 @@ type propsType = {
8
8
  isModify?: boolean;
9
9
  customValue?: (data: any) => any;
10
10
  buttonName?: string;
11
+ enterToSubmit?: boolean;
11
12
  };
12
13
  declare const AntBaseModalCreate: ({ modalProps, formProps, props }: {
13
14
  modalProps: ModalFuncProps;
package/dist/esm/index.js CHANGED
@@ -23293,6 +23293,12 @@ const AntBaseModalCreate = ({ modalProps, formProps, props }) => {
23293
23293
  form.resetFields();
23294
23294
  onFinish(data);
23295
23295
  }
23296
+ }, onKeyDown: (e) => {
23297
+ if (props.enterToSubmit !== true) {
23298
+ if (e.key === "Enter") {
23299
+ e.preventDefault();
23300
+ }
23301
+ }
23296
23302
  } },
23297
23303
  column,
23298
23304
  customColumn,
@@ -24403,14 +24409,14 @@ const TitleBox$1 = ({ title, decs }) => {
24403
24409
 
24404
24410
  const TbpageMulti = ({ arrtableProps, arrflex, searchOption, searchDisabled = false, onSubmit, isLoading, title, decs, direction, }) => {
24405
24411
  const { user } = useTbState();
24406
- return (React__default.createElement("div", { className: styles$1.tableFrame, style: direction === "column" ? { flexDirection: "column" } : { flexDirection: "row" } },
24412
+ return (React__default.createElement("div", { className: styles$1.tableFrame },
24407
24413
  title || decs ? React__default.createElement(TitleBox, { title: title, decs: decs }) : null,
24408
24414
  searchOption && (React__default.createElement(SearchBox, { searchOption: searchOption, onSubmit: onSubmit, searchDisabled: searchDisabled, onReset: () => {
24409
24415
  if (onSubmit)
24410
24416
  onSubmit(null, null, true);
24411
24417
  } })),
24412
24418
  React__default.createElement(LoadingLayout, { isLoading: isLoading },
24413
- React__default.createElement("div", { className: styles$1.multiFrame }, arrtableProps.map((item, index) => {
24419
+ React__default.createElement("div", { className: styles$1.multiFrame, style: direction === "column" ? { flexDirection: "column" } : { flexDirection: "row" } }, arrtableProps.map((item, index) => {
24414
24420
  if (item.type === "table") {
24415
24421
  return (React__default.createElement("div", { key: `${item.type}_${index.toString()}`, className: styles$1.multiitem, style: arrflex && { flex: arrflex[index] } },
24416
24422
  item.title && React__default.createElement("div", { className: styles$1.itemtitle }, item.title),