Skip to content

Commit

Permalink
Merge pull request #1009 from AI4Bharat/clearChildren
Browse files Browse the repository at this point in the history
make language array of lsf unique
  • Loading branch information
ishvindersethi22 authored Apr 24, 2024
2 parents 9699f23 + 1c9f64c commit 1c80d94
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/ui/pages/container/Label-Studio/LSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -991,8 +991,8 @@ const LabelStudioWrapper = ({
if(Array.isArray(taskData?.data?.language)){
taskData?.data?.language?.map((lang)=>{
selectedLanguages.current?.push(lang);
const newLanguages = [...selectedL, ...taskData?.data?.language];
setSelectedL(newLanguages);
const newLanguages = new Set([...selectedL, ...taskData?.data?.language]);
setSelectedL(Array.from(newLanguages));
});
}
if(typeof taskData?.data?.language === 'string' && taskData?.data?.ocr_domain !== ""){
Expand Down
4 changes: 2 additions & 2 deletions src/ui/pages/container/Label-Studio/ReviewLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1199,8 +1199,8 @@ useEffect(() => {
if(Array.isArray(taskData?.data?.language)){
taskData?.data?.language?.map((lang)=>{
selectedLanguages.current?.push(lang);
const newLanguages = [...selectedL, ...taskData?.data?.language];
setSelectedL(newLanguages);
const newLanguages = new Set([...selectedL, ...taskData?.data?.language]);
setSelectedL(Array.from(newLanguages));
});
}
if(typeof taskData?.data?.language === 'string' && taskData?.data?.ocr_domain !== ""){
Expand Down
4 changes: 2 additions & 2 deletions src/ui/pages/container/Label-Studio/SuperCheckerLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,8 @@ useEffect(() => {
if(Array.isArray(taskData?.data?.language)){
taskData?.data?.language?.map((lang)=>{
selectedLanguages.current?.push(lang);
const newLanguages = [...selectedL, ...taskData?.data?.language];
setSelectedL(newLanguages);
const newLanguages = new Set([...selectedL, ...taskData?.data?.language]);
setSelectedL(Array.from(newLanguages));
});
}
if(typeof taskData?.data?.language === 'string' && taskData?.data?.ocr_domain !== ""){
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/container/Transliteration/Transliteration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const Transliteration = (props) => {
getOptionLabel={(el) => el.DisplayName}
sx={{ width: window.innerWidth * 0.15 }}
renderInput={(params) => <TextField {...params} label="" placeholder="Select Language" />}

disableClearable={true}
/>
</Grid>

Expand Down

0 comments on commit 1c80d94

Please sign in to comment.