Display 'Delete Selected' in Drafts Conditionally

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@lifecruiser·
0.000 HBD
Display 'Delete Selected' in Drafts Conditionally
![busy-logo.PNG](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519262215/iri51hfransmbovirncx.png)

#### Expected behavior
In the busy.org drafts page, the users are shown their saved drafts. There is a button 'Deleted Selected' which will delete the select drafts or we can select all drafts and delete them at once. If none of the drafts are selected then this should be disabled, users should not be allowed to click on it.

Delete option is available for each individual drafts too, which is working fine but not the 'Delete selected' button placed above the drafts list.

#### Actual behavior
The 'Delete selected' button is always visible even when none of the drafts are selected. The link is active hence the users can click on it, then it shows a confirmation pop up for deletion. Logically it is incorrect because the users have not selected any drafts but yet the deletion confirmation shows up when we click on 'Delete Selected', after confirming nothing happens. 

Basically, the 'Delete Selected' should work only when the user has selected atleast one draft from the list. 

#### How to reproduce
1. Go to https://busy.org
2. After logging in, navigate to drafts page through the header menu 'three dots menu' and select 'Drafts'
3. Alternatively, once logged in we can navigate to https://busy.org/drafts
4. If any drafts are available, 'Delete selected' will appear above the drafts list.
5. Click on it & it would show confirmation popup (and that is the bug!)

* Browser: *Chrome*
* Operating system: *Windows 7*

#### Recording Of The Bug
Recording of the bug and steps to reproduce is available below. 

![busy_drafts_800.gif](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519262222/wsxjmgwxnzkrl5uamzla.gif)


<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@lifecruiser/display-delete-selected-in-drafts-conditionally">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,