Skip to content

Commit

Permalink
ref #24628 - Don't show form status under action widget
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed May 22, 2024
1 parent a6c7d55 commit 0310dba
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import CheckOutlined from '@ant-design/icons/lib/icons/CheckOutlined'
import ExclamationOutlined from '@ant-design/icons/lib/icons/ExclamationOutlined'
import { Button } from 'antd'

import WidgetError from '../../theme/Errors/WidgetError'
Expand All @@ -12,10 +10,7 @@ export function ActionWidget({ InputProps, error, form, webformField }) {
htmlType="submit"
style={{ alignItems: 'center', display: 'inline-flex' }}
>
{!!form?.error && !form?.loading && <ExclamationOutlined />}
{!!form?.loaded && <CheckOutlined />}
{form?.loading && 'Submitting...'}
{!form?.loading && (webformField['#submit__label'] || 'Submit')}
{webformField['#submit__label'] || 'Submit'}
</Button>
<WidgetError
name={InputProps?.name}
Expand Down

0 comments on commit 0310dba

Please sign in to comment.