simonhamp / laravel-nova-csv-import

The best CSV import component for Laravel Nova
https://novapackages.com/packages/simonhamp/laravel-nova-csv-import
MIT License
166 stars 76 forks source link

Custom - Single Value Fails #50

Closed matt7ds closed 1 year ago

matt7ds commented 1 year ago

When configuring an input to have a fixed 'custom' Single Value for a field, the value is lost and the following error is given in the console:

Uncaught TypeError: Cannot create property 'FIELDNAME' on string ''

(where FIELDNAME is the name of the field on the resource you are importing)

This can be fixed by editing line 228 on resources/js/pages/Configure.js

this.values = "";

to

this.values = {};

simonhamp commented 1 year ago

Could you create a PR?

matt7ds commented 1 year ago

I have - I actually put a small other fix in there on the Review screen (incorrect reference to map instead of mappings). I explained in the PR I hope

simonhamp commented 1 year ago

Linking to PR #51