-
Notifications
You must be signed in to change notification settings - Fork 4
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
Ka 2020 04 translate org fields #1799
Conversation
…1768 It makes the buttons switch between the languages, and all languages addable (if they aren't already there) and removable (if they are there) on the plus-button. The jQuery was there to choose the right language for the tabs, which are in the html. So, currently if a language is removed that was active on the tabs, The tab content is still shown, while no button is active and the respective language is removed when saving.
…st-switch My first thought was to move the tabs into the react component, but that would have been a lot of effort. Instead (to make it slightly less confusing), I added a second dropdown (-) to remove languages and use the first dropdown (+) only add them.
this.props.languages.map(languageCode => { | ||
this.props.languages.map((languageCode, i) => { | ||
return ( | ||
<span key={languageCode}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phillimorland I am a bit unhappy with returning an empty span for the languages that shouldn't be in the list, but couldn't think of a better way. (Apart from also having a list of the inactive languages in the state, but that would be a bit annoying to always update two lists, then.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is ok for now to be honest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the drop down and it's definitely working and displaying correctly :)
There are long explanations in the commits. Please read them separately.