AllenFang / AllenFang/react-bootstrap-table

custom multi select warning

Ouverte
#2,035 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
2.2k
Forks
761
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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)
...
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.