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 ?? (
|
||||
<XButton
|
||||
className={css(`
|
||||
&:not(:hover) {
|
||||
border-left-color: transparent;
|
||||
}
|
||||
margin-left: -1px;
|
||||
`)}
|
||||
type={variable ? 'primary' : 'default'}
|
||||
/>
|
||||
|
@ -6,19 +6,16 @@ import { css } from '@emotion/css';
|
||||
|
||||
export function JSONInput(props) {
|
||||
return (
|
||||
<div>
|
||||
<RawTextArea
|
||||
buttonClass={css`
|
||||
&:not(:hover) {
|
||||
border-right-color: transparent;
|
||||
border-top-color: transparent;
|
||||
}
|
||||
background-color: transparent;
|
||||
`}
|
||||
{...props}
|
||||
component={Input.JSON}
|
||||
/>
|
||||
;
|
||||
</div>
|
||||
<RawTextArea
|
||||
buttonClass={css`
|
||||
&:not(:hover) {
|
||||
border-right-color: transparent;
|
||||
border-top-color: transparent;
|
||||
}
|
||||
background-color: transparent;
|
||||
`}
|
||||
{...props}
|
||||
component={Input.JSON}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ function setNativeInputValue(input, value) {
|
||||
}
|
||||
|
||||
export function RawTextArea(props): JSX.Element {
|
||||
console.log('🚀 ~ file: RawTextArea.tsx:20 ~ RawTextArea ~ props:', props);
|
||||
const inputRef = useRef<any>(null);
|
||||
const { changeOnSelect, component: Component = Input.TextArea, ...others } = props;
|
||||
const scope = typeof props.scope === 'function' ? props.scope() : props.scope;
|
||||
|
@ -394,14 +394,7 @@ export function TextArea(props) {
|
||||
/>
|
||||
{!disabled ? (
|
||||
<VariableSelect
|
||||
className={css`
|
||||
&:not(:hover) {
|
||||
border-right-color: transparent;
|
||||
border-top-color: transparent;
|
||||
// border-bottom-color: transparent;
|
||||
}
|
||||
background-color: transparent;
|
||||
`}
|
||||
className=""
|
||||
options={options}
|
||||
setOptions={setOptions}
|
||||
onInsert={onInsert}
|
||||
|
@ -102,7 +102,14 @@ export const useCustomizeRequestActionProps = () => {
|
||||
},
|
||||
});
|
||||
} 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 {
|
||||
actionField.data.loading = false;
|
||||
|
Loading…
Reference in New Issue
Block a user