AllenFang / AllenFang/react-bootstrap-table

custom multi select warning

Offen
#2,035 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
2.2k
Forks
761
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

i have the following code where i only want to show the tick box on certain rows

```
customMultiSelect(props) {

const { type, checked, disabled, onChange, rowIndex } = props;
console.log(rowIndex);
/*
* If rowIndex is 'Header', means this rendering is for header selection column.
*/
if (rowIndex === 'Header' ) {
if( this.state.statusButton.value == 1){
return (






);
}
return (


);

} else {

if(this.state.data[rowIndex].exemption_status_id != 1 || this.state.data[rowIndex].security_engineer != 'Not Assigned'){
return '';
}
return (


onChange(e, rowIndex) }
ref={ input => {
if (input) {
input.indeterminate = props.indeterminate;
}
} }/>



);
}
}
```

i seem to keep getting this warning message in the console

```
main.bundle.js:125022 Warning: Received `false` for a non-boolean attribute `indeterminate`.

If you want to write it to the DOM, pass a string instead: indeterminate="false" or indeterminate={value.toString()}.

If you used to conditionally omit it with indeterminate={condition && value}, pass indeterminate={condition ? value : undefined} instead.
in input (created by Checkbox)
in label (created by Checkbox)
in div (created by Checkbox)
...
...
main.bundle.js:125007 Warning: React does not recognize the `rowIndex` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `rowindex` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
in input (created by Checkbox)
in label (created by Checkbox)
in div (created by Checkbox)
in Checkbox (created by bound customMultiSelect)
...
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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