mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-03 09:16:40 +00:00
Make sure to default the match
This commit is contained in:
@@ -579,7 +579,16 @@ export default function ReverseProxyTargets(props: {
|
|||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
onClick={() => setShowPathInput(true)}
|
onClick={() => {
|
||||||
|
setShowPathInput(true);
|
||||||
|
// Set default pathMatchType when first showing path input
|
||||||
|
if (!row.original.pathMatchType) {
|
||||||
|
updateTarget(row.original.targetId, {
|
||||||
|
...row.original,
|
||||||
|
pathMatchType: "prefix"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
+ {t("matchPath")}
|
+ {t("matchPath")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -556,7 +556,16 @@ export default function Page() {
|
|||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
onClick={() => setShowPathInput(true)}
|
onClick={() => {
|
||||||
|
setShowPathInput(true);
|
||||||
|
// Set default pathMatchType when first showing path input
|
||||||
|
if (!row.original.pathMatchType) {
|
||||||
|
updateTarget(row.original.targetId, {
|
||||||
|
...row.original,
|
||||||
|
pathMatchType: "prefix"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
+ {t("matchPath")}
|
+ {t("matchPath")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user