1.0.4 • Published 5 years ago

@yanayg/hierarchy-tag-group v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@yanayg/hierarchy-tag-group

npm npm bundle size

Install

$ npm install @yanayg/hierarchy-tag-group

Example

Removing keywords

Closing tags

Adding back keywords

notice the tags collapsing back because all tags are present

Adding the tab back

Usage

...
import {HierarchyTagGroup} from '@yanayg/hierarchy-tag-group';

class App extends React.Component {
    state = {
        data: ['all']
    };
    
    render() {
        return (
            <HierarchyTagGroup
                schema={{
                    all: { 
                        tag: {},
                        tag2: {
                            tag3: {},
                            tag4: {}
                        }
                    }
                }}
                data={this.state.data}
                onChange={(dt) => this.setState({data: dt}) }
                tooltip
            />
        )
    }
}