找回密码
 立即注册

QQ登录

只需一步,快速开始

muyang1214

注册会员

3

主题

10

帖子

29

积分

注册会员

积分
29
最新发帖
muyang1214
注册会员   /  发表于:2023-7-31 13:37  /   查看:1339  /  回复:5
10金币

<FlexGrid
        itemsSource={data}
        headersVisibility="Column"
      >
        {tableColumns.map(item => {
          const { header, binding, align, format, allowSorting, cssClass, width } = item || {}
          return (
            <FlexGridColumn
              key={binding}
              header={header}
              binding={binding}
              align={align}
              format={format}
              allowSorting={allowSorting}
              cssClass={cssClass}
              width={width}
            />
          )
        })}
        <wjFilter.FlexGridFilter>
        </wjFilter.FlexGridFilter>
      </FlexGrid>


当我在表格过滤框中随便输入一个值后,然后快速移开,会报错





[backcolor=rgba(206, 17, 38, 0.1)]Cannot read properties of null (reading 'offsetHeight')TypeError: Cannot read properties of null (reading 'offsetHeight')    at ValueFilterEditor._adjustWidths (http://localhost:3000/static/js/bundle.js:16402:11)    at http://localhost:3000/static/js/bundle.js:16389:9



这是什么原因?
1.如果过滤这列存在的值,是正常的不会报错
2.如果过滤这列不存在的值(就是我乱输入的),停上几秒在移开,也正常
3.就是我乱输入后立马移开,就会报错




附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

5 个回复

倒序浏览
Richard.Ma讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2023-7-31 13:50:50
沙发
请上传一个重现问题的demo,我们来协助验证原因
回复 使用道具 举报
muyang1214
注册会员   /  发表于:2023-7-31 14:12:03
板凳
好的,demo怎么上传,是我直接发示例代码吗?
回复 使用道具 举报
muyang1214
注册会员   /  发表于:2023-7-31 14:22:27
地板
  1. import React from 'react';
  2. import '@grapecity/wijmo.styles/wijmo.css';
  3. import { FlexGrid } from '@grapecity/wijmo.react.grid';
  4. import { FlexGridFilter } from "@grapecity/wijmo.react.grid.filter";

  5. import './multiRow.scss'

  6. function App() {
  7.   const data = [
  8.     {
  9.         "ID": "1",
  10.         "Name": "hhh",
  11.     },
  12.     {
  13.         "ID": "2",
  14.         "Name": "ggg",
  15.     },
  16. ]
  17.   return (
  18.     <div className='multiRow'>
  19.       <FlexGrid
  20.         itemsSource={data}
  21.       >
  22.         <FlexGridFilter>
  23.         </FlexGridFilter>
  24.       </FlexGrid>
  25.     </div>

  26.   );
  27. }

  28. const RevocableOrderForm = () => (
  29.   <App />
  30. )

  31. export default RevocableOrderForm;
复制代码
回复 使用道具 举报
muyang1214
注册会员   /  发表于:2023-7-31 14:30:15
5#
这是效果图

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
Richard.Ma讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2023-7-31 17:59:32
6#
如果你是看的官网在线示例,请把 在线示例的链接发上来,并说明需要修改的代码

如果是你这边自己的demo,请将完整的可以跑起来的项目发上来

总之,我需要先运行起来项目来重现你说的问题
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部