Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

xiugai

tonytonychopper1235a0d8ca708f1
diff --git a/packages/base-ui/src/Components/Menu/index.module.less b/packages/base-ui/src/Components/Menu/index.module.less
index e985467487..3c6b5c2aed 100644
--- a/packages/base-ui/src/Components/Menu/index.module.less
+++ b/packages/base-ui/src/Components/Menu/index.module.less
@@ -12,6 +12,10 @@
overflow-y: auto;
text-align: center;
+ &::-webkit-scrollbar {
+ display: none;
+ }
+
.cols-menuitem {
min-width: 80px;
position: relative;
@@ -53,4 +57,4 @@
z-index: 100;
box-sizing: border-box;
user-select: none;
-}
+}
\ No newline at end of file
diff --git a/packages/core/src/Shared/ObjectMatrix.ts b/packages/core/src/Shared/ObjectMatrix.ts
index 614207d9b3..a482156298 100644
--- a/packages/core/src/Shared/ObjectMatrix.ts
+++ b/packages/core/src/Shared/ObjectMatrix.ts
@@ -182,7 +182,15 @@ export class ObjectMatrix<T> {
// }
insertColumns(columnIndex: number, columnData: ObjectMatrix<T>) {
- const count = columnData.getRow(0)!.getLength();
+ let count = 0;
+ columnData.forEach((key) => {
+ const data = columnData.getRow(key);
+ if (data) {
+ count = data.getLength();
+ return false;
+ }
+ });
+
this.forEach((index, value) => {
for (let i = columnIndex; i < columnIndex + count; i++) {
const data = columnData.getRow(index)?.get(i - columnIndex);