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

columnFormatters: assign a component to render a column's cells #333

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alisman
Copy link

@alisman alisman commented Nov 2, 2016

When Reactable is passed a data structure, we want to be able to designate a custom component to render inside each td of a particular column. This is based on a nice feature of react-bootstrap-table. This allows us to avoid using unsafeHTML and handle callbacks/interactivity cleanly.

This could have been handled in columns attribute, by adding an optional component property to each column object. But because of the way columns object disables column inference, this would require devs to build out the entire columns object even if only one column necessitated a component. (Personally, I think it would have been better to make developers filter columns out themselves--that is, keep column infererence but allow inferred columns to be overwritten by configuration in columns object.)

This PR assumes that passing data structure and using the components are mutually exclusive strategies.

…ents to render cells

add tests for columnFormatters
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.

1 participant