noi-techpark / it.bz.opendatahub.databrowser

Explore and navigate through Open Data you need to build your next service.
https://databrowser.opendatahub.com
GNU Affero General Public License v3.0
8 stars 7 forks source link

"SelectWithOptionsCell" Invalid prop error #452

Closed sseppi closed 6 months ago

sseppi commented 8 months ago

By running the Data Browser in localhost and for example tying to access the following link

http://localhost:3000/dataset/edit/tourism/v1/MetaData/00109544-2a58-4051-b619-b350e0035d20

I get the following error message

[Vue warn]: Invalid prop: type check failed for prop "showAddNewValue". Expected Boolean, got String with value "true".
  at <SelectWithOptionsCell value="tourism" showAddNewValue="true" showValueAsLabelFallback="true"  ... >

Probably the problem is due to the fact that the component expects a boolean parameter, but the WebComponents are able to handle only Strings.

From a first analysis the team did, we see 3 possible solutions:

sseppi commented 8 months ago

@gappc and @MatteoBiasi : we sould discuss this point during the next Sprint Meeting and identify the best way to go to solve this bug.

sseppi commented 7 months ago

@MatteoBiasi will change the code to pass a string and improve the documentation explainig that in the actual implementation the components accept only Strings.

@gappc will post a comment in the ComponentRenderer code (https://github.com/noi-techpark/it.bz.opendatahub.databrowser/blob/development/databrowser/src/components/componentRenderer/ComponentRenderer.vue) wit the proposal of the optionimazion (allow to passo object to Vue components and only strings to Web Components) that will be implemented in the future. Once the comment has been posted a dedicated issue will be created by @sseppi

gappc commented 6 months ago

@sseppi I think we can close this issue, what do you say?