g787543 / infinite-react-carousel

Infinite carousel for react
https://g787543.github.io/infinite-react-carousel/
MIT License
110 stars 34 forks source link

Error: cannot create array #19

Closed hariomssharmah closed 4 years ago

hariomssharmah commented 4 years ago

Get below error when try to use this control in one of my react project using SPFx framework:

Error: can not create array at new CircularArray (array.js:115) at Slider. (slider.js:208) at Yi (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1) at $i (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1) at Na (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1) at Ma (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1) at sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1 at Object.Ay1f.t.unstable_runWithPriority (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1) at wo (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1) at xo (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1)

Any help would be highly appreciated!

lukaszewiczAd commented 4 years ago

Get below error when try to use this control in one of my react project using SPFx framework:

Did you solve it? @g787543, could you tell something about it? I have the same problem when I refresh the page with the Slider.

hariomssharmah commented 4 years ago

@lukaszewiczAd I had to use another control as I had time limitations. I used slick-slider which seems much easier to extend and meets most of my requirements.

lorenamelor commented 4 years ago

same problem here.

danielbarion commented 3 years ago

same problem here.

Encoded77 commented 3 years ago

Also same problem

pnkorn commented 3 years ago

+

brianbentancourt commented 2 years ago

I have the same problem. Solution?

farhan-amjad commented 2 years ago

this worked for me as i found that the slider component doesn't load immediately.

const [isSlider, setisSlider] = useState(false) useEffect(()=>{ setisSlider(true) },[])

return (

{sliderVisible && //slide items here }

);

daniel-barbosaa commented 11 months ago

como o amigo @farhan-amjad disse, isso funcionou pra mim tbm, estava quebrando a cabeça com isso achei que teria que usar outra lib obrigado @farhan-amjad

const [isSlider, setisSlider] = useState(false) useEffect(()=>{ setisSlider(true) },[])

retornar (

{sliderVisível & //deslize os itens aqui } );

NicolasJEngler commented 7 months ago

this worked for me as i found that the slider component doesn't load immediately.

const [isSlider, setisSlider] = useState(false) useEffect(()=>{ setisSlider(true) },[])

return ( {sliderVisible && //slide items here } );

As simple as it may seem, this was the solution for me.