fix(plugin-custom-request): improve x button style and afterSuccess not work when manualClose is enable (#2882)
* feat: improve x button style * fix: manualClose does not enable logic
This commit is contained in:
parent
f5f74382f8
commit
d2bf691b69
@ -336,9 +336,7 @@ export function Input(props) {
|
|||||||
{button ?? (
|
{button ?? (
|
||||||
<XButton
|
<XButton
|
||||||
className={css(`
|
className={css(`
|
||||||
&:not(:hover) {
|
margin-left: -1px;
|
||||||
border-left-color: transparent;
|
|
||||||
}
|
|
||||||
`)}
|
`)}
|
||||||
type={variable ? 'primary' : 'default'}
|
type={variable ? 'primary' : 'default'}
|
||||||
/>
|
/>
|
||||||
|
@ -6,19 +6,16 @@ import { css } from '@emotion/css';
|
|||||||
|
|
||||||
export function JSONInput(props) {
|
export function JSONInput(props) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<RawTextArea
|
||||||
<RawTextArea
|
buttonClass={css`
|
||||||
buttonClass={css`
|
&:not(:hover) {
|
||||||
&:not(:hover) {
|
border-right-color: transparent;
|
||||||
border-right-color: transparent;
|
border-top-color: transparent;
|
||||||
border-top-color: transparent;
|
}
|
||||||
}
|
background-color: transparent;
|
||||||
background-color: transparent;
|
`}
|
||||||
`}
|
{...props}
|
||||||
{...props}
|
component={Input.JSON}
|
||||||
component={Input.JSON}
|
/>
|
||||||
/>
|
|
||||||
;
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ function setNativeInputValue(input, value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function RawTextArea(props): JSX.Element {
|
export function RawTextArea(props): JSX.Element {
|
||||||
console.log('🚀 ~ file: RawTextArea.tsx:20 ~ RawTextArea ~ props:', props);
|
|
||||||
const inputRef = useRef<any>(null);
|
const inputRef = useRef<any>(null);
|
||||||
const { changeOnSelect, component: Component = Input.TextArea, ...others } = props;
|
const { changeOnSelect, component: Component = Input.TextArea, ...others } = props;
|
||||||
const scope = typeof props.scope === 'function' ? props.scope() : props.scope;
|
const scope = typeof props.scope === 'function' ? props.scope() : props.scope;
|
||||||
|
@ -394,14 +394,7 @@ export function TextArea(props) {
|
|||||||
/>
|
/>
|
||||||
{!disabled ? (
|
{!disabled ? (
|
||||||
<VariableSelect
|
<VariableSelect
|
||||||
className={css`
|
className=""
|
||||||
&:not(:hover) {
|
|
||||||
border-right-color: transparent;
|
|
||||||
border-top-color: transparent;
|
|
||||||
// border-bottom-color: transparent;
|
|
||||||
}
|
|
||||||
background-color: transparent;
|
|
||||||
`}
|
|
||||||
options={options}
|
options={options}
|
||||||
setOptions={setOptions}
|
setOptions={setOptions}
|
||||||
onInsert={onInsert}
|
onInsert={onInsert}
|
||||||
|
@ -102,7 +102,14 @@ export const useCustomizeRequestActionProps = () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return message.success(compile(onSuccess?.successMessage));
|
message.success(compile(onSuccess?.successMessage));
|
||||||
|
if (onSuccess?.redirecting && onSuccess?.redirectTo) {
|
||||||
|
if (isURL(onSuccess.redirectTo)) {
|
||||||
|
window.location.href = onSuccess.redirectTo;
|
||||||
|
} else {
|
||||||
|
navigate(onSuccess.redirectTo);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
actionField.data.loading = false;
|
actionField.data.loading = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user