react-edp-components

4.7.3 • Public • Published

Usage

Here we describe most common use of this grid Here we describe most common use of this grid

Basic Usage

 <Grid gridId="documentos"
                                contextMenuItems={ecm.model.desktop.actionLists.ItemContextMenu}
                                resultSet={resultSet}
                                onRowSelect={this.handleRowSelect}
                                isLink={false}
                            />

Expand Row : Expand row shows a react component when click on table.To more details about how to implement a custom ExpandRow https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/basic-row-expand.html

<Grid gridId="documentos"
                                contextMenuItems={ecm.model.desktop.actionLists.ItemContextMenu}
                                resultSet={resultSet}
                                onRowSelect={this.handleRowSelect}
                                isLink={false}
                                hasExpandRow={true}
                                customExpandRow="Expanded"
                            />

AdditionalColumns : Add extra columns on table

 columns = [
        {
            dataField: 'isEditable',
            text: '',
            formatter: (cell, row) => (
                <button
                    type="button"
                    className="btn btn-link hoverable padIcon"
                    onClick={e => {
                        e.stopPropagation();
                        this.handleProperties(row);
                    }}>
                    <Icon icon="EDITAR" size={30} color="#EE162D" />
                </button>
            ),
            headerStyle: {
                width: '10px'
            }
        }]
 
 <Grid
                                    resultSet={newResultSet}
                                    onRowSelect={this.handleRowSelect}
                                    additionalColumns={[...this.columns]}
                                    selected={true} />
 

OverwriteMethod : perform the overwrithedMethod param when click on table link. default behavior is perform the first action of contextMenu.

  <Grid
                                pageSize={5}
                                id="sub-table"
                                resultSet={this.state.subfolderContent}
                                overwriteMethod={row =>console.log(row)}
                                isLink={true}
                            />

Readme

Keywords

none

Package Sidebar

Install

npm i react-edp-components

Weekly Downloads

156

Version

4.7.3

License

none

Unpacked Size

530 kB

Total Files

57

Last publish

Collaborators

  • saddd07