material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Selecting row causes header to only display search bar instead of search bar and isFreeAction: true actions

Open calebhypes opened this issue 7 years ago • 2 comments

Describe the bug When selecting a row (checkbox) any actions set to isFreeAction: true for tables that have options={{selection: true}} are hidden by the red styled header causing these actions to be unusable.

To Reproduce Steps to reproduce the behavior:

  1. Create basic MaterialTable component
  2. Assign props: options={{selection: true}} and actions={[{ icon: 'settings', tooltip: "Test", isFreeAction: true, ... }]}
  3. Select any row checkbox
  4. Selection header is now hiding the header actions.

Expected behavior Upon selecting a row, I should still be able to use the free actions from the table header.

Desktop (please complete the following information):

  • OS: MacOS Mojave 10.14.2
  • Browser: Chrome
  • Version: 72.0.3626.121

Additional context I found this issue when attempting to use isFreeAction to circumvent Issue #372 . As it stands, I'm unable to allow selection and have usable actions either on the row itself or on the table header.

calebhypes avatar Mar 25 '19 19:03 calebhypes

This is not a bug, too. free actions mean that they can work without data. Such as add a new item.

mbrn avatar Mar 25 '19 19:03 mbrn

@mbrn Thanks again for clarifying, I was attempting to use this as a "global" action of sorts for items such as mass delete/remove but it appears your response to #372 clears up how to handle that for multiple items.

calebhypes avatar Mar 25 '19 19:03 calebhypes