akiran / akiran/react-slick

How to hide a specific slide?

Offen
#1,953 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
11.9k
Forks
2.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Depending the value of some variables, our slider should show only some slides, but I shouldn't filter before pushing to the list, but I keep getting a empty space
.
Just a example:
```
var items= [];
this.state.oItems.map(oItem => {
items.push(


);
});
return(
<>

{items}


);
```

Some cases _ShouldShow_ will return

{this.props.children}
and others will return **only null**
This works with cards that are not in but in slider, even when returning null, this div is created without childs:
`
`
Even
is showing an empty space but i expect no space at all.

render of ShouldShow:
```
public render(): JSX.Element {
if (this.state.canView) {
return (

{this.props.children}
);
} else {
return (null);
}
}
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.