Topic: mdbDatatable doesn't change hovercolor with hoverColor props

JSONROY free asked 3 years ago


Expected behavior

Props: hoverColor will change the color of the hovered row in datatable.

Actual behavior

It doesn't change the color once hovered

Noticed that the hover color change using datatable2.

Resources (screenshots, code snippets etc.)

Not working:

<mdb-datatable
    :data="data"
    striped
    bordered
    materialInputs
    responsive
    fixedHeader
    reactive
    :time="10000"
    :display="3"
    hover
    hoverColor="red"
    @selectRow="rowSelected($event)"
/>

Working :

<mdb-datatable2
    v-model="data"
    @selected="selected = $event"
    striped
    bordered
    materialInputs
    responsive
    fixedHeader
    reactive
    multiselectable
    :time="10000"
    :display="3"
    hoverColor="red"
/>

JSONROY free answered 3 years ago


I found the problem. The solution was adding the focus props.

<mdb-datatable
    :data="data"
    focus
    striped
    bordered
    materialInputs
    responsive
    fixedHeader
    reactive
    :time="10000"
    :display="3"
    hover
    hoverColor="red"
    @selectRow="rowSelected($event)"
/>

Magdalena Dembna staff commented 3 years ago

The previous Datatable version has a slightly different API - and the hover option is reserved for tables with a focus property - that's why in an example column of a props' list they're listed together. Best regards, Magdalena


FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.7.1
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No