Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MDBAutoV5 getValue should return Object not value

mgtripoli pro asked 4 years ago


Expected behavior

My expectation for this component would be for it to return the Object which I have selected, not the value I have annotated in the dataKey prop. The value returned to me serves no real purpose, when I am trying to build a relationship based on the objects I have passed to the component. For me, and probably others, the dataKey value is just a value I use to search on, but the Objects I have passed, will contain a PK, which I need to build a relation.

Actual behavior

The will only return the value (or the dataKey) I have passed. This forces me to then do a lookup, in my array, for the object which contains the value of whatever was passed back to me in the callback.

Resources (screenshots, code snippets etc.)

enter image description here

How it should work

It should flow like this

enter image description here

As a code-based example:

enter image description here


mgtripoli pro commented 4 years ago

I want to avoid doing a search for an object with a make of "whatever is selected". This adds unnecessary overhead, if I am potentially searching for hundreds or more records in an array.


Piotr Glejzer staff commented 4 years ago

hi, I added the task to improve that.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.26.0
  • Device: Macbook Pro mid-2017
  • Browser: Firefox, Chrome
  • OS: macOS
  • Provided sample code: No
  • Provided link: No