Skip to content

#1405 Multiline Cell component#1417

Merged
wlthomson merged 2 commits intodevelopfrom
#1405-multiline-cell
Oct 21, 2019
Merged

#1405 Multiline Cell component#1417
wlthomson merged 2 commits intodevelopfrom
#1405-multiline-cell

Conversation

@josh-griffin
Copy link
Copy Markdown
Contributor

@josh-griffin josh-griffin commented Oct 19, 2019

Fixes #1405

Change summary

  • Adds a maxLines prop to Cell, default of 2

image

image

Testing

  • Have an ItemLine/Supplier/Customer with a really long name and look at the name in the DataTable, should look all good over two lines

Related areas to think about

N/A

have updated PR for react-native-data-table: msupply-foundation/react-native-data-table#57

@josh-griffin josh-griffin added this to the Mobile 3.0.0 milestone Oct 20, 2019
Copy link
Copy Markdown
Contributor

@wlthomson wlthomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TESTS

  • Have an ItemLine/Supplier/Customer with a really long name and look at the name in the DataTable, should look all good over two lines. SUCCESS.

CODE

LGTM. One small naming nit.

Comment thread src/widgets/DataTable/Cell.js Outdated
return (
<View style={internalViewStyle}>
<Text ellipsizeMode="tail" numberOfLines={1} style={textStyle}>
<Text ellipsizeMode="tail" numberOfLines={maxLines} style={textStyle}>
Copy link
Copy Markdown
Contributor

@wlthomson wlthomson Oct 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just my opinion, think its nice to use consistent props with the underlying component. E.g. numberOfLines instead of maxLines. I think unless the underlying component is being used in a very different way, it makes sense to model component "APIs" consistently with the conventions used by the built-in components?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wlthomson wlthomson merged commit 74c90a7 into develop Oct 21, 2019
@wlthomson wlthomson deleted the #1405-multiline-cell branch October 21, 2019 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants