@ai-matrx/records-ui 0.115.95 → 0.115.96
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/CHANGELOG.md +1 -1
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +5 -2
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +5 -2
- package/dist/pickers.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -10621,11 +10621,14 @@ function ButtonValue({ field: field2, recordId, inCell }) {
|
|
|
10621
10621
|
const tableId = field2.entity_definition_id;
|
|
10622
10622
|
const press = async () => {
|
|
10623
10623
|
if (!client || !recordId) return setSaid({ kind: "public" });
|
|
10624
|
-
if (needs) return setSaid({ kind: "needs", says: needs });
|
|
10624
|
+
if (needs && b.do) return setSaid({ kind: "needs", says: needs });
|
|
10625
10625
|
setBusy(true);
|
|
10626
10626
|
const answered = await client.buttonPress({ record_id: recordId, field_id: field2.id });
|
|
10627
10627
|
setBusy(false);
|
|
10628
|
-
if (!answered.ok)
|
|
10628
|
+
if (!answered.ok) {
|
|
10629
|
+
if (needs && (answered.error.sqlstate === "22023" || answered.error.code === "invalid_argument")) return setSaid({ kind: "needs", says: needs });
|
|
10630
|
+
return setSaid({ kind: "refused", error: answered.error });
|
|
10631
|
+
}
|
|
10629
10632
|
const pressed = answered.data;
|
|
10630
10633
|
if (pressed.do === "open_url") {
|
|
10631
10634
|
const opened = typeof window !== "undefined" ? openOutbound(pressed.url, "_blank", "noopener") : null;
|