New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow final layout to be customised #48
Conversation
Thank you Michael, I will take a look at this after work, sorry I missed your other issue. |
No trouble! Thanks for the prompt response. |
We move the final layout of the tags & input into a function provided by the props with a default implementation. The default reproduces the current layout but the mechanism allows client code to override the final layout so that, for example, the input can appear above the tags instead of after them. We use function.call to pass the 'this' down to the layout function so that it can access this.props and generally be an extension of the render function.
Sorry Michael, I totally forgot about this pull request 😞 I have done a major update to |
Will do! I'll close this for now and re-open if there is an issue. Thanks for the update! |
My code changes no longer apply but I feel the essence of this pull request is still unresolved with version 3. I think your changes are great but they focus on being able to customize the tags and customize the input but not the order of the tags and the input. ie. I cannot use version 3 to place the input before the tags as in my example above. Perhaps this is achievable with CSS in some way but I feel like the order of the elements is difficult to work around. That said, I completely understand if what I'm trying to do is beyond the scope of this project. That's your call! Cheers, |
Thank you Michael, I will take a look at implementing |
Hello Micheal, I've added a |
Looks great! Thank you very much. I'll try to give it a go and report back if there are any issues! |
Hi,
This is a potential implementation for #47 if you consider supporting it. The idea is to allow the final layout of the input & tags to be customised as some changes are harder achieve with CSS than by changing the order of the tags.
My use case is wanting a larger input field and the tags listed below.
One note is that I've done this against the pre-react-0.14 code base as I'm not using react-0.14 quite yet. I think it should be easily rebased if you think it is worth including.
From the commit message:
An alternative approach would be to have a 'flip' prop which put the input first then the tags. It would be a more focussed change. This is a more general solution but might open things up too much. Not sure. Or perhaps I'm missing a trick completely and this isn't necessary.
Cheers,
Michael