关于 kendo-angular-resize-sensor 的文档

Documentation about kendo-angular-resize-sensor

我们有很多情况需要在调整容器大小时更改 kendo 网格高度。 我在 npm 包上看到过:@progress/kendo-angular-resize-sensor 但我真的没有看到任何文档发布。

以后会有吗? 如果是,什么时候?

非常感谢。

当务之急是让网格响应 "by default"。这包括列的自动调整大小和 min-width 设置。

目前您可以使用 following snippet 作为这些功能的手动替代。

@Component({
  template: `
    <kendo-grid
        [height]="gridHeight">
        ...
    </kendo-grid>
    <!-- An internal component that will soon go public -->
    <kendo-resize-sensor (resize)="resize()"></kendo-resize-sensor>
  `
})
export class AppComponent {
    public gridHeight: number = 300;

    public resize(): void {
      // The Grid height is actually applied to the content area, not as total
      // This is **a bug** that will be fixed soon.
      this.gridHeight = this.elementRef.nativeElement.offsetHeight - 100;
    }

    ...
}

我们希望将调整大小传感器保留为实现细节。不过,它可能会在客户端应用程序中找到用途。我们将在未来几周内为其添加文档。