Releases: uptick/react-object-list
Releases · uptick/react-object-list
0.2.11
0.2.10
Exposing some of the filtering elements so they can be consumed without having to utilise the entire react-object-list
v0.2.5
Adds a class to the filter block
v0.2.5
v0.1.8
0.1.7
v0.1.6
v0.1.4
Fix bug with removing filters
0.1.1 [BREAKING]
Backwards Incompatible Changes
Icons are no longer specified by default (#74)
import React from 'react'
import ReactDOM from 'react-dom'
import ObjectList from 'react-object-list'
import {FontAwesome} from 'react-object-list/icons'
var mount = document.querySelectorAll('div.browser-mount');
ReactDOM.render(
<ObjectList
icons={FontAwesome(4)}
/>,
mount[0]
);
or your own icons by specifying as so:
<ObjectList
icons={{
OptionalFields: <i className="list" />,
Favourites: <i className="heart" />,
RemoveFavourite: <i className="trash" />,
RemoveFilter: <i className="minus-circle" />,
DropdownOpen: <i className="caret-down" />,
DropdownClose: <i className="caret-up" />,
SortAsc: <i className="caret-up" />,
SortDesc: <i className="caret-down" />,
Unsorted: <i className="sort" />,
Loading: <i className="circle-notch spin" />,
CheckboxChecked: <i className="check-square" />,
CheckboxUnchecked: <i className="square" />,
}}
/>
Unspecified icons will not show (excl. RemoveFavourite, SortAsc, SortDesc, CheckboxChecked, CheckboxUnchecked, RemoveFilter).
v0.0.45
Allow for columns to inject a classname into the row
{
dataKey: 'id',
header: 'ID',
sortKey: 'id',
sparseFields: [
{model: 'Task', fields: ['is_active']},
],
rowClass: (row) => row.attributes && (!row.attributes.is_active ? 'inactive': null),
}
Allow item renderers to specify a react element instead of a function or a class
{
dataKey: 'id',
header: 'ID',
item: <MyCustomComponent />,
},
This will result in the CustomComponent
being cloned and injected with props containing row
, column
and value