File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
src/components/CognateAnalysisModal Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -1238,6 +1238,38 @@ class SuggestionSelection extends React.Component {
12381238 </ span >
12391239
12401240 < div >
1241+ < div
1242+ key = { `sg${ index } all` }
1243+ className = "lingvo-cognate-checkbox lingvo-cognate-checkbox_result"
1244+ >
1245+ < Checkbox
1246+ className = "lingvo-checkbox lingvo-checkbox_labeled"
1247+ label = { < label style = { { color : "green" , fontStyle : "oblique" } } > { this . context ( "All" ) } </ label > }
1248+ disabled = { disabled_flag }
1249+ checked = {
1250+ single_list . every ( ( [ perspective_index , [ transcription_str , translation_str ] , entry_id ] ) => {
1251+ if ( sg_entry_map [ id2str ( entry_id ) ] [ index ] &&
1252+ ! sg_select_list [ index ] . hasOwnProperty ( id2str ( entry_id ) ) ) {
1253+ return false ;
1254+ }
1255+ return true ;
1256+ } )
1257+ }
1258+ onChange = { ( e , { checked } ) => {
1259+ map ( single_list ,
1260+ ( [ perspective_index , [ transcription_str , translation_str ] , entry_id ] ) => {
1261+ if ( sg_entry_map [ id2str ( entry_id ) ] [ index ] && checked ) {
1262+ sg_select_list [ index ] [ id2str ( entry_id ) ] = null ;
1263+ } else {
1264+ delete sg_select_list [ index ] [ id2str ( entry_id ) ] ;
1265+ }
1266+ }
1267+ ) ;
1268+ this . setState ( { sg_select_list } ) ;
1269+ } }
1270+ />
1271+ </ div >
1272+
12411273 { map (
12421274 single_list ,
12431275
You can’t perform that action at this time.
0 commit comments