braid-ui 1.0.44 → 1.0.46
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/css/braid-ui.css +4 -0
- package/dist/css/braid-ui.min.css +1 -1
- package/dist/index.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1895,7 +1895,10 @@ var useFormWithEditState = ({
|
|
|
1895
1895
|
}
|
|
1896
1896
|
}, [onToggleEdit]);
|
|
1897
1897
|
const handleSave = useCallback(async () => {
|
|
1898
|
-
|
|
1898
|
+
const isFormValid = await form.trigger();
|
|
1899
|
+
if (!isFormValid) {
|
|
1900
|
+
return;
|
|
1901
|
+
}
|
|
1899
1902
|
setIsLoading(true);
|
|
1900
1903
|
try {
|
|
1901
1904
|
const data = form.getValues();
|
|
@@ -1912,7 +1915,7 @@ var useFormWithEditState = ({
|
|
|
1912
1915
|
} finally {
|
|
1913
1916
|
setIsLoading(false);
|
|
1914
1917
|
}
|
|
1915
|
-
}, [form,
|
|
1918
|
+
}, [form, onSave, onToggleEdit]);
|
|
1916
1919
|
const handleCancel = useCallback(() => {
|
|
1917
1920
|
reset();
|
|
1918
1921
|
if (onCancel) {
|
|
@@ -5805,6 +5808,7 @@ var CounterpartyProfileCard = ({
|
|
|
5805
5808
|
/* @__PURE__ */ jsx(
|
|
5806
5809
|
FormSelect,
|
|
5807
5810
|
{
|
|
5811
|
+
disabled: true,
|
|
5808
5812
|
name: "idType",
|
|
5809
5813
|
label: "Associated with",
|
|
5810
5814
|
placeholder: "Select association type",
|
|
@@ -5819,6 +5823,7 @@ var CounterpartyProfileCard = ({
|
|
|
5819
5823
|
/* @__PURE__ */ jsx(
|
|
5820
5824
|
FormInput,
|
|
5821
5825
|
{
|
|
5826
|
+
disabled: true,
|
|
5822
5827
|
name: "idValue",
|
|
5823
5828
|
label: form.watch("idType") === "product_id" ? "Product ID" : form.watch("idType") === "business_id" ? "Business ID" : form.watch("idType") === "individual_id" ? "Individual ID" : "Account Number",
|
|
5824
5829
|
placeholder: "Enter ID value"
|