@farmzone/fz-react-ui 1.1.3 → 1.1.4

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/dist/index.d.cts CHANGED
@@ -1014,6 +1014,8 @@ interface PageFilterProps<P> {
1014
1014
  colGap?: number;
1015
1015
  submitButtonText?: string;
1016
1016
  resetButtonText?: string;
1017
+ showSubmitButton?: boolean;
1018
+ showResetButton?: boolean;
1017
1019
  values: P;
1018
1020
  primaryColor?: string;
1019
1021
  }
package/dist/index.d.ts CHANGED
@@ -1014,6 +1014,8 @@ interface PageFilterProps<P> {
1014
1014
  colGap?: number;
1015
1015
  submitButtonText?: string;
1016
1016
  resetButtonText?: string;
1017
+ showSubmitButton?: boolean;
1018
+ showResetButton?: boolean;
1017
1019
  values: P;
1018
1020
  primaryColor?: string;
1019
1021
  }
package/dist/index.js CHANGED
@@ -7828,6 +7828,8 @@ function PageFilter(props) {
7828
7828
  colGap = 0,
7829
7829
  submitButtonText = "\uAC80\uC0C9",
7830
7830
  resetButtonText = "\uCD08\uAE30\uD654",
7831
+ showSubmitButton = true,
7832
+ showResetButton = true,
7831
7833
  values,
7832
7834
  primaryColor
7833
7835
  } = props;
@@ -7935,12 +7937,13 @@ function PageFilter(props) {
7935
7937
  }
7936
7938
  ) }, String(optionKey));
7937
7939
  case "checkbox":
7938
- return /* @__PURE__ */ jsx(LabeledFilterOption, { label: option.label, gap: rowGap2, children: /* @__PURE__ */ jsx(
7940
+ return /* @__PURE__ */ jsx(LabeledFilterOption, { gap: rowGap2, children: /* @__PURE__ */ jsx(
7939
7941
  Checkbox,
7940
7942
  {
7941
7943
  checked: currentValue === "true",
7942
7944
  name: String(optionKey),
7943
7945
  value: currentValue,
7946
+ label: option.label,
7944
7947
  onChange: handleCheckboxChange(optionKey, option.autoSubmit)
7945
7948
  }
7946
7949
  ) }, String(optionKey));
@@ -7959,9 +7962,9 @@ function PageFilter(props) {
7959
7962
  const isLastRow = rows.length - 1 === ix;
7960
7963
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-row min-h-11", children: [
7961
7964
  row.options.map((option, index) => renderFilterOption(option, rowGap, index)),
7962
- isLastRow && /* @__PURE__ */ jsxs("div", { className: "ml-2 flex flex-row items-center gap-2", children: [
7963
- /* @__PURE__ */ jsx(Button, { variant: "search", onClick: handleSubmit, children: submitButtonText }),
7964
- onReset && /* @__PURE__ */ jsx(Button, { variant: "reset", onClick: handleReset, children: resetButtonText })
7965
+ isLastRow && (showSubmitButton || showResetButton && onReset) && /* @__PURE__ */ jsxs("div", { className: "ml-2 flex flex-row items-center gap-2", children: [
7966
+ showSubmitButton && /* @__PURE__ */ jsx(Button, { variant: "search", onClick: handleSubmit, children: submitButtonText }),
7967
+ onReset && showResetButton && /* @__PURE__ */ jsx(Button, { variant: "reset", onClick: handleReset, children: resetButtonText })
7965
7968
  ] })
7966
7969
  ] }, row.options.map((opt) => String(opt.key)).join("_"));
7967
7970
  }) })