Comments (1)
I have the same problem. It comes from this part of the code:
const MarkShippedModal: React.FC<MarkShippedModalProps> = ({
orderId,
fulfillment,
handleCancel,
}) => {
const { t } = useTranslation()
const { control, watch, handleSubmit } = useForm<MarkShippedFormData>({
defaultValues: {
tracking_numbers: [{ value: "" }],
},
shouldUnregister: true,
})
const [noNotis, setNoNotis] = useState(false)
const {
fields,
append: appendTracking,
remove: removeTracking,
} = useFieldArray({
control,
name: "tracking_numbers",
})
const watchedFields = watch("tracking_numbers")
// Allows us to listen to onChange events
const trackingNumbers = fields.map((field, index) => ({
...field,
...watchedFields[index],
}))
watchedFields gets undefined after a second rerender. And the you get a nullpointer in ...watchedFields[index]
Simple solution would be to just guard it. Also it is strange since tracking_numbers is set in the default values. I assume useFieldArray might do something with it via the "control".
As of right now you can just manually change the part in the .cache - at least for some local development.
from medusa.
Related Issues (20)
- TypeORMError: Entity metadata for Store#default_currency was not found HOT 3
- V2 : Error deleting selected product image
- create-medusa-app should not make assumptions about database name HOT 1
- Upload files in production using @medusajs/file-s3@preview doesn't work (MinIO) HOT 2
- Error with Restock Notifications Plugin
- Error running create-medusa-app@preview, Service "salesChannelService" was not found HOT 4
- Medusa migrations run missing tables HOT 2
- min_quantity and max_quantity not set when trying to update variant prices
- Sendgrid plugin not sending emails for events with templates configured in plugin options HOT 2
- Unable to override default emailpass auth provider module HOT 1
- Medusa Book link Broken HOT 1
- remove redis it's no longer open source it's a waste of time HOT 1
- @medusajs/framework is not releasing according to other @medusajs packages HOT 3
- Deleting an image does not trigger the delete method of AbstractFileProviderService HOT 1
- Migration run doesn't work on docker even with sslmode=disable HOT 1
- /admin/users/me unauthorized, after login (via NIGINX proxy server) HOT 2
- Problem with fetching products with specified category_id
- Extending Product Category results in productCategoryRepo.getFreeTextSearchResultsAndCount is not a function
- Shipping options can't have 0 price HOT 1
- Medusa v2 Docs: Issue in 1. Introduction - Medusa v2 Docs - Search docs Not Working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medusa.