@apexcura/ui-components 0.0.11-Beta205 → 0.0.11-Beta207
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.js +14 -7
- package/dist/index.mjs +14 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -615,8 +615,17 @@ var import_antd14 = require("antd");
|
|
|
615
615
|
var import_react19 = __toESM(require("react"));
|
|
616
616
|
var import_antd13 = require("antd");
|
|
617
617
|
var ModelElement = (props) => {
|
|
618
|
-
const { onCancel, model } = props;
|
|
619
|
-
|
|
618
|
+
const { onCancel, model, selectedRecord } = props;
|
|
619
|
+
console.log("selectedRecord in model", selectedRecord);
|
|
620
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
621
|
+
import_antd13.Modal,
|
|
622
|
+
{
|
|
623
|
+
open: model,
|
|
624
|
+
onCancel,
|
|
625
|
+
footer: null
|
|
626
|
+
},
|
|
627
|
+
/* @__PURE__ */ import_react19.default.createElement("p", null, "Model opened")
|
|
628
|
+
);
|
|
620
629
|
};
|
|
621
630
|
|
|
622
631
|
// src/Components/TableElement.tsx
|
|
@@ -624,16 +633,14 @@ var TableElement = (props) => {
|
|
|
624
633
|
const { thead, tbody } = props;
|
|
625
634
|
const [selectedRecord, setSelectedRecord] = (0, import_react20.useState)({});
|
|
626
635
|
const [model, setModel] = (0, import_react20.useState)(false);
|
|
636
|
+
console.log("selectedRecord", selectedRecord);
|
|
627
637
|
let columns = [];
|
|
628
638
|
if (thead) {
|
|
629
639
|
columns = [
|
|
630
640
|
{
|
|
631
641
|
title: "#",
|
|
632
642
|
dataIndex: "#",
|
|
633
|
-
key: "#"
|
|
634
|
-
sorter: {
|
|
635
|
-
compare: (a, b) => a["#"] - b["#"]
|
|
636
|
-
}
|
|
643
|
+
key: "#"
|
|
637
644
|
},
|
|
638
645
|
...thead.map((col, ind) => ({
|
|
639
646
|
title: col.label,
|
|
@@ -662,7 +669,7 @@ var TableElement = (props) => {
|
|
|
662
669
|
columns,
|
|
663
670
|
bordered: true,
|
|
664
671
|
size: props.size && props.size,
|
|
665
|
-
onRow: (record
|
|
672
|
+
onRow: (record) => {
|
|
666
673
|
return {
|
|
667
674
|
onClick: () => {
|
|
668
675
|
setSelectedRecord(record);
|
package/dist/index.mjs
CHANGED
|
@@ -564,8 +564,17 @@ import { Table as Table2 } from "antd";
|
|
|
564
564
|
import React18 from "react";
|
|
565
565
|
import { Modal } from "antd";
|
|
566
566
|
var ModelElement = (props) => {
|
|
567
|
-
const { onCancel, model } = props;
|
|
568
|
-
|
|
567
|
+
const { onCancel, model, selectedRecord } = props;
|
|
568
|
+
console.log("selectedRecord in model", selectedRecord);
|
|
569
|
+
return /* @__PURE__ */ React18.createElement(
|
|
570
|
+
Modal,
|
|
571
|
+
{
|
|
572
|
+
open: model,
|
|
573
|
+
onCancel,
|
|
574
|
+
footer: null
|
|
575
|
+
},
|
|
576
|
+
/* @__PURE__ */ React18.createElement("p", null, "Model opened")
|
|
577
|
+
);
|
|
569
578
|
};
|
|
570
579
|
|
|
571
580
|
// src/Components/TableElement.tsx
|
|
@@ -573,16 +582,14 @@ var TableElement = (props) => {
|
|
|
573
582
|
const { thead, tbody } = props;
|
|
574
583
|
const [selectedRecord, setSelectedRecord] = useState5({});
|
|
575
584
|
const [model, setModel] = useState5(false);
|
|
585
|
+
console.log("selectedRecord", selectedRecord);
|
|
576
586
|
let columns = [];
|
|
577
587
|
if (thead) {
|
|
578
588
|
columns = [
|
|
579
589
|
{
|
|
580
590
|
title: "#",
|
|
581
591
|
dataIndex: "#",
|
|
582
|
-
key: "#"
|
|
583
|
-
sorter: {
|
|
584
|
-
compare: (a, b) => a["#"] - b["#"]
|
|
585
|
-
}
|
|
592
|
+
key: "#"
|
|
586
593
|
},
|
|
587
594
|
...thead.map((col, ind) => ({
|
|
588
595
|
title: col.label,
|
|
@@ -611,7 +618,7 @@ var TableElement = (props) => {
|
|
|
611
618
|
columns,
|
|
612
619
|
bordered: true,
|
|
613
620
|
size: props.size && props.size,
|
|
614
|
-
onRow: (record
|
|
621
|
+
onRow: (record) => {
|
|
615
622
|
return {
|
|
616
623
|
onClick: () => {
|
|
617
624
|
setSelectedRecord(record);
|