Leonard-Li777 / antd-table-infinity

An infinite scroll component based on antd-table that supports virtual scrolling
Other
284 stars 47 forks source link

Failed to import antd-table-infinity in a meteor project #2

Closed yuri3 closed 5 years ago

yuri3 commented 5 years ago

Hi Leonard, I've recently found out this lib (antd-table-infinity), and tried to use it in the meteor project, but got errors, when try just import (import { InfinityTable } from 'antd-table-infinity'), if you will have some time can you please check it? To quickly check please create a simple meteor project (meteor create --react new-react-app) after you install Meteor, here is the link for the info => (https://www.meteor.com/install)

screen shot 2018-11-14 at 8 23 55 am

Thanks.

Leonard-Li777 commented 5 years ago

Are you try antd-table-infinity@0.0.11 ? I updated it in yesterday

yuri3 commented 5 years ago

Hi, yes I’ve tried, got the same errors:(

Leonard-Li777 commented 5 years ago

try import { InfinityTable } from 'antd-table-infinity/dist'

yuri3 commented 5 years ago

Hi Leonard, yes, I also tried that, and project runs, but shows another errors again and again like loop.

screen shot 2018-11-15 at 8 34 51 am

if you will have some time, please create a simple meteor project and try to import to see. Thanks.

Leonard-Li777 commented 5 years ago

fine! fixed it in antd-table-infinity@0.0.12

Leonard-Li777 commented 5 years ago

meteor incompatible lodash-es, replace with lodash.throttle

yuri3 commented 5 years ago

Hi Leonard thanks a lot, it works, but now in the console show ups these warnings

screen shot 2018-11-19 at 8 49 25 am screen shot 2018-11-19 at 8 49 39 am

if I understand correct columns prop should be an array of objects, please check that. Thanks.

Leonard-Li777 commented 5 years ago

columns type is array! fixed it in antd-table-infinity@0.0.13

const columns = [ { title: 'index', dataIndex: 'index', render: text => text, width: 50, }, { title: 'Name', dataIndex: 'name', width: 100, }, { title: 'Age', width: 50, dataIndex: 'age', }, { title: 'Address', width: 200, dataIndex: 'address', }, ];

yuri3 commented 5 years ago

Hi Leonard, thanks a lot, all works.