@zhenliang/sheet 0.1.72-beta.6 → 0.1.72-beta.7

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { SheetType } from "../../type";
2
3
  declare const DefaultCell: (props: {
3
4
  cell: SheetType.Cell;
@@ -306,8 +306,12 @@ var Sheet = function Sheet(props) {
306
306
  // 当前可视区域的宽度
307
307
  var clientWidth = div.clientWidth;
308
308
  setIsScrolledOver(scrollLeft > 0);
309
+ if (scrollWidth === clientWidth) {
310
+ setIsScrolledToEnd(true);
311
+ return;
312
+ }
309
313
  // 判断是否滚动到底
310
- if (scrollLeft + clientWidth >= scrollWidth) {
314
+ if (scrollLeft + clientWidth + 1 >= scrollWidth) {
311
315
  setIsScrolledToEnd(true);
312
316
  } else {
313
317
  setIsScrolledToEnd(false);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { SheetType } from "../../../type";
2
3
  import './index.less';
3
4
  export declare const DraggableShell: ({ columns, className, showGroup, showSelect, controlProps, controlWidth, }: SheetType.SheetShell) => import("react").FC<{
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { SheetType } from "../../type";
2
3
  import './draggableShell/index.less';
3
4
  export declare const TableShell: ({ columns, className, showGroup, showSelect, controlProps, controlWidth, }: SheetType.SheetShell) => import("react").FC<{
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import EventEmitter from 'events';
2
3
  declare const useEventBus: () => EventEmitter;
3
4
  export { useEventBus };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhenliang/sheet",
3
- "version": "0.1.72-beta.6",
3
+ "version": "0.1.72-beta.7",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",