fix: allow clear translation target in action
This commit is contained in:
@@ -412,13 +412,23 @@ export function ActionCard({
|
||||
<Select
|
||||
value={data.result.translation}
|
||||
onValueChange={(value) => {
|
||||
data.result.translation = value
|
||||
if (value === "none") {
|
||||
delete data.result.translation
|
||||
} else {
|
||||
data.result.translation = value
|
||||
}
|
||||
onChange(data)
|
||||
}}
|
||||
>
|
||||
<CommonSelectTrigger className="max-w-44" />
|
||||
<SelectContent>
|
||||
{TransitionOptions.map((option) => (
|
||||
{[
|
||||
{
|
||||
name: t("actions.action_card.no_translation"),
|
||||
value: "none",
|
||||
},
|
||||
...TransitionOptions,
|
||||
].map((option) => (
|
||||
<SelectItem key={option.value} value={option.value}>
|
||||
{option.name}
|
||||
</SelectItem>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"actions.action_card.from": "From",
|
||||
"actions.action_card.generate_summary": "Generate summary using AI",
|
||||
"actions.action_card.name": "Name",
|
||||
"actions.action_card.no_translation": "No translation",
|
||||
"actions.action_card.operation_options.contains": "contains",
|
||||
"actions.action_card.operation_options.does_not_contain": "does not contain",
|
||||
"actions.action_card.operation_options.is_equal_to": "is equal to",
|
||||
|
||||
Reference in New Issue
Block a user