Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

react-bootstrap-treeview improvements #2

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

vivian-perez
Copy link

  1. custom event onLineClicked

  2. dynamic data in TreeNode attributes with TreeView.treeNodeAttributes propType.

  3. TreeView.data propType correction

  4. _this deprecated and replaced with bind

  5. react-bootstrap-treeview become a commonJS component.

  6. Gruntfile has been modified in order to run example.

  7. TreeView ADD prop boolean iSelectionExclusive (default false): When a line is selected, others are unselected

vivian-perez and others added 28 commits April 16, 2015 14:59
Add "key" for efficient react comparison.
Add an onLineClicked custum event.
Allow developper to pass dynamic information in TreeNode.
Dynamic attributes are passed in an object {attribute key : attribute value }
attribute key: what we want => data-test
attribute value: a key of this.props.data => id

For example,
var data = [
    {
        text: 'Parent 1',
        id: '1',
      }
];

React.render(
    <TreeView
        data={data}
        treeNodeAttributes={{'data-id':'id'}}/>,
    document.getElementById('treeview')
);
Merge clickByProps branch into master
It can be required via
TreeView = require('react-bootstrap-treeview');
Delete useless bower call on install
Useless since last commit
key unique dans TreeView et TreeNiode.
On se base sur le nodeId unique sur tous les niveaux.
- Possibilité de réduire le texte
- Possibilité de ne pas mettre de glyphicon
- Possibilité d'avoir des badges qui calculent automatiquement le nombre de fils
- Les badges sont affichés correctement
Pas de badge 0 sur les feuilles
- Si on est sur une feuille, pas de badge
- mode selectLeafOnly: ne sélectionne visuellement qui si l'élément cliqué est une feuille
- collapse / expand sur toute la ligne, pas seulement sur le + ou -
- gestion d'un glyph diférent si ligne selected: nodeIconSelected
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants