Closed Ashoat closed 6 years ago
Looking at this a bit more, there are several more opinionated changes, including changes to default component style and code formatting. Let me know if you'd like me to revert those portions and I can try to come up with something that includes just the "modernization" pieces. Mostly just wanna know that PRs are welcome before doing the work :)
@sibelius @jwohlfert23 Just wondering if this is going to be reviewed, I would like to use this package but not if it isn't up to date with the current state of react native. It looks really useful!
Sorry about the style changes etc. in the initial PR! Like 50% of Github repo maintainers don't pay attention to PRs, so I've learned not to invest too much into a PR before I get a response. I've just updated the PR with several other modernizations, and the opinionated stuff should be out.
I should note that I'm using this component as a typeahead (eg. search results appear below the TagInput
, and update whenever the text changes). To make that happen I had to fork a version with a callback for when the text changes. I haven't included those changes here, since they're orthogonal to the modernization effort, but if you're open to it I'd like to put up a PR with those changes once these ones are in.
I'd like to see that typeahead get merged too
Sent from my Google Nexus 5 using FastHub
@rtman - to be clear, it's not a full typeahead; just a refactored version of this component that can be used to build a typeahead.
I went ahead and created an RFC issue to discuss merging that version into this one: #39. However, note that it would represent pretty substantial changes, most notably ripping out the existing parseTags
logic. Consequently, figured I'd solicit comments on the change. There's a link in the issue to the version of this component I am using, so you can just copy that version into your project if you'd like.
I'm using this library in my application, and ended up "modernizing" it a bit. Changes include:
prop-types
package (fixes bug in package for >RN0.45)Object
, useStyleObj
fromreact-native
, use$ReadOnlyArray
, etc.measure()
calls (which break on Android - x-position is always 0 for nested inline elements) withonLayout
(more idiomatic)PureComponent
Tag
component to avoid having to do inline function declarationsI recognize this is a pretty meaty PR, and I considered not submitting it since I imagine you might ask for it to broken into smaller PRs, but I figured there's nothing to lose by submitting :)