|
@@ -26,6 +26,7 @@ interface IWidget {
|
|
|
srcChannel?: IChannel;
|
|
srcChannel?: IChannel;
|
|
|
destChannel?: IChannel;
|
|
destChannel?: IChannel;
|
|
|
sentences?: string[];
|
|
sentences?: string[];
|
|
|
|
|
+ important?: boolean;
|
|
|
goPrev?: Function;
|
|
goPrev?: Function;
|
|
|
onSubmit?: Function;
|
|
onSubmit?: Function;
|
|
|
}
|
|
}
|
|
@@ -33,6 +34,7 @@ const ChannelSentDiffWidget = ({
|
|
|
srcChannel,
|
|
srcChannel,
|
|
|
destChannel,
|
|
destChannel,
|
|
|
sentences,
|
|
sentences,
|
|
|
|
|
+ important = false,
|
|
|
goPrev,
|
|
goPrev,
|
|
|
onSubmit,
|
|
onSubmit,
|
|
|
}: IWidget) => {
|
|
}: IWidget) => {
|
|
@@ -105,7 +107,11 @@ const ChannelSentDiffWidget = ({
|
|
|
});
|
|
});
|
|
|
setDiffData(diffList);
|
|
setDiffData(diffList);
|
|
|
setNewRowKeys(newRows);
|
|
setNewRowKeys(newRows);
|
|
|
- setSelectedRowKeys(newRows);
|
|
|
|
|
|
|
+ if (important) {
|
|
|
|
|
+ setSelectedRowKeys(sentences);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ setSelectedRowKeys(newRows);
|
|
|
|
|
+ }
|
|
|
setEmptyRowKeys(emptyRows);
|
|
setEmptyRowKeys(emptyRows);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -127,6 +133,7 @@ const ChannelSentDiffWidget = ({
|
|
|
<Select
|
|
<Select
|
|
|
defaultValue={"new"}
|
|
defaultValue={"new"}
|
|
|
style={{ width: 180 }}
|
|
style={{ width: 180 }}
|
|
|
|
|
+ disabled={important}
|
|
|
onChange={(value: string) => {
|
|
onChange={(value: string) => {
|
|
|
switch (value) {
|
|
switch (value) {
|
|
|
case "new":
|
|
case "new":
|