[go: up one dir, main page]

Skip to content
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

Set english language selected by default #2921

Merged
merged 3 commits into from
Oct 9, 2019

Conversation

Dilshaad21
Copy link
Member
@Dilshaad21 Dilshaad21 commented Sep 26, 2019

Fixes #2691

Changes: When all the languages are deselected it displays english as default language

Demo Link: https://pr-2921-fossasia-susi-web-chat.surge.sh

@Dilshaad21 Dilshaad21 closed this Sep 26, 2019
@Dilshaad21 Dilshaad21 deleted the patch_04 branch September 26, 2019 12:25
@Dilshaad21 Dilshaad21 restored the patch_04 branch September 28, 2019 04:21
@Dilshaad21 Dilshaad21 reopened this Sep 28, 2019
@Dilshaad21
Copy link
Member Author

@akshatnitd PTAL.

src/components/NavigationBar/index.js Outdated Show resolved Hide resolved
@@ -327,8 +327,12 @@ class NavigationBar extends Component {

handleLanguageChange = (event, index, values) => {
localStorage.setItem('languages', event.target.value);
let languages = [...event.target.value];
Copy link
Member

Choose a reason for hiding this comment

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

Why using spread operator here?
Can' t we just do,

let languages = event.target.value;

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok @akshatnitd I agree , will make the changes.

Changed the handleLanguageChange such that english
language is selected by default when no languages are selected
by user for searching skills
@akshatnitd akshatnitd merged commit 7660d6b into fossasia:master Oct 9, 2019
shagunarora pushed a commit to shagunarora/susi.ai that referenced this pull request Oct 10, 2019
Changed the handleLanguageChange such that english
language is selected by default when no languages are selected
by user for searching skills
pulkit1joshi pushed a commit to pulkit1joshi/susi.ai that referenced this pull request Jan 20, 2020
Changed the handleLanguageChange such that english
language is selected by default when no languages are selected
by user for searching skills
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.

Fix the language popover
3 participants