← All changes
|
js/components/common/ListTable/TableNavigation.tsx
+2
-2
3.10.0-beta.1
→
trunk
View file →
| @@ -75,9 +75,9 @@ | ||
| 75 | 75 | <BulkActionSelectOptions actions={actions} /> |
| 76 | 76 | </select> |
| 77 | 77 | |
| 78 | 78 | interface BulkActionsProps<K extends Key, A extends string> extends Required<Pick<TableNavProps<K, A>, 'which' | 'actions' | 'doAction'>> { |
| 79 | - onActionSuccess?: () => void | |
| 79 | + onActionSuccess?: VoidFunction | |
| 80 | 80 | disabled?: boolean |
| 81 | 81 | selected: Set<K> |
| 82 | 82 | selectLabel?: string |
| 83 | 83 | } |
| @@ -124,9 +124,9 @@ | ||
| 124 | 124 | id={`doaction${'bottom' === which ? '-2' : ''}`} |
| 125 | 125 | name="bulk_action" |
| 126 | 126 | text={__('Apply', 'code-snippets')} |
| 127 | 127 | className="action" |
| 128 | - disabled={!!disabled || isPerformingAction || !selectedAction} | |
| 128 | + disabled={!!disabled || isPerformingAction || !selectedAction || 0 === selected.size} | |
| 129 | 129 | onClick={handleSubmit} |
| 130 | 130 | /> |
| 131 | 131 | |
| 132 | 132 | {isPerformingAction ? <Spinner /> : null} |