Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map Select not working #12

Closed
WTM-Jarryd opened this issue Jun 29, 2020 · 3 comments
Closed

Map Select not working #12

WTM-Jarryd opened this issue Jun 29, 2020 · 3 comments

Comments

@WTM-Jarryd
Copy link

WTM-Jarryd commented Jun 29, 2020

Hi,

First off, great project.

I am having some issue with the map column type.

According to the documentation, when using a column of type="map", the options prop will accept Object or Function.
I am dynamically constructing the Object via a computed method.

When loading the page it console logs the following warning:

Invalid prop: type check failed for prop "options". Expected Array, Function, got Object

It seems to be partially working where I can see it is selecting the correct Text value from the map when I manually change the key value of the column, however I am unable to get the selection dropdown to open.

It returns the following error:

Error in render: "TypeError: _vm.autocompleteInputs is undefined"

found in

---> at node_modules/vue-excel-editor/src/VueExcelEditor.vue

Below is my generated map object:
{ 1_1: "PVC-0.35, White", 1_2: "PVC-0.35, Walnut", 1_3: "PVC-0.35, Mahogony", 1_4: "PVC-0.35, Ebony", 2_1: "ABS-1.0, White", 2_2: "ABS-1.0, Walnut", 2_3: "ABS-1.0, Mahogony", 2_4: "ABS-1.0, Ebony" }

If I change the column value from 1_1 to 1_2, I see the cell text change from "PVC-0.35, White" to "PVC-0.35, Walnut"

If I feed it a simple string array, then the select dropdown functionality works, however then I no longer have the key value to work with.

This is in a sample project that I spun up to test the spreadsheet, so the editor is the only component on the page.
Perhaps I am missing something small. Please let me know if you need further information.

Kind regards,
Jarryd

@cscan
Copy link
Owner

cscan commented Jun 30, 2020

Please try 1.3.73, it fixes the options prop contains static object problem

For your 2nd question, I could not know "feed it" means. You mean type an unknown string into it? It should show "blank" I think. What is your expected area? I think it involves some validation logic you can "feed in". ^^

@cscan cscan closed this as completed Jun 30, 2020
@WTM-Jarryd
Copy link
Author

Hello,

I will try the update.

What I mean by feed, is if I pass a String array with the select options instead of the Object map when using type="map", the dropdown functionality will work.

I will test and let you know if it is working.

@WTM-Jarryd
Copy link
Author

Apologies for the late follow up.

The update did fix this. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants