lu-lowcode-package-form 0.11.60 → 0.11.61
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.cjs.js +249 -249
- package/dist/index.es.js +20199 -20197
- package/package.json +1 -1
- package/src/components/field/table/index.jsx +4 -1
package/package.json
CHANGED
@@ -50,8 +50,10 @@ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow,
|
|
50
50
|
|
51
51
|
useEffect(() => {
|
52
52
|
console.log("Table props", props)
|
53
|
+
console.log("Table props.columnsWidth", props?.columnsWidth)
|
53
54
|
if (Array.isArray(props?.columnsWidth) && !_.isEqual(props?.columnsWidth, headWidths)) {
|
54
55
|
setHeadWidths(props?.columnsWidth)
|
56
|
+
setInitialWidth(props?.columnsWidth)
|
55
57
|
}
|
56
58
|
}, [props])
|
57
59
|
|
@@ -59,6 +61,7 @@ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow,
|
|
59
61
|
console.log("Table headWidths", headWidths)
|
60
62
|
},[headWidths])
|
61
63
|
|
64
|
+
const [initialWidth, setInitialWidth] = useState([])
|
62
65
|
const [headWidths, setHeadWidths] = useState([])
|
63
66
|
const tableComponentId = props.componentId || props.__id
|
64
67
|
const newidRefs = useRef(React.Children.map(children, () => nanoid()));
|
@@ -149,7 +152,7 @@ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow,
|
|
149
152
|
return <div className="fw-full ">
|
150
153
|
|
151
154
|
<div className="fw-full frelative fmin-h-20 foverflow-x-auto" style={{ position: 'relative' }}>
|
152
|
-
<DragHead changeWidth={handleChangeWidth} initialWidth={
|
155
|
+
<DragHead changeWidth={handleChangeWidth} initialWidth={initialWidth} showAction={disabled != true && readonly != true} childrenDesc={childrenDesc}/>
|
153
156
|
{fields.length === 0 && <div key={`tableHead`} className="fborder-b fflex flex-nowrap fmin-w-full ">
|
154
157
|
{React.Children.map(children, (child, childIndex) => {
|
155
158
|
const hidden = (child?.props?.calcHidden || !getDependencyMapShow(child?.props?.componentId || child?.props?.__id)) && mode != "desgin";
|