Topic: mdb-select multi save button

Kiliso free asked 3 years ago


I am using 5.1.2 not 5.1.1 but there was no option

I'm using this multi-select component

<mdb-select id="playerSearch" multiple search @getValue="getSelectValue" :options="playerList" />

When interacting with the select there's a save button which when clicked will automatically try to post to the page. I would like to disable this functionality and if possible, change the button to just close the select popup.

Also when trying to use the search in the searchable table component I get an error about the filteredRows variable being watched.

<mdb-datatable :data="data" striped bordered :searching="false"/>

It populates data just fine but any type of searching will throw an error.

[Vue warn]: Error in getter for watcher "filteredRows": "TypeError: Cannot read property 'toString' of undefined"


Mikołaj Smoleński staff answered 3 years ago


Hi there Kiliso,

Select save button is not posting to the page. As You can see in the code it only toggles the options visibility:

<mdb-btn v-if="multiple" save color="primary" size="sm" @click.native="toggle = !toggle">{{btnSavePlaceholder}}</mdb-btn>

To fix datatables search please remove searching attribute from Your code:

<mdb-datatable :data="data" striped bordered />

Please write me back if it will not help.

Best regards


Kiliso free commented 3 years ago

By default though, on my page when I click save it submits like a form. I do have this save inside a mdb-step tag but I have :submitFunction="createTeam". Is this component treating any button inside as a submit button that's not part of itself? Regarding the searching, I did remove the searching however it would be nice to have it.


Mikołaj Smoleński staff commented 3 years ago

Ok, we'll try to change the functionality for save button in the next release. Best regards



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 5.1.1
  • Device: Mac
  • Browser: Chrome 73.0.3683.86
  • OS: Mac OS
  • Provided sample code: Yes
  • Provided link: No
Tags