I have this List object, but later on the shape changed, I need an extra id property, but how to not modify List? Answer You can extend the List interface
Tag: javascript
How to save the name of object in array object?
I have an array containing 7 objects named is NewClass. When I make some changes to the objects, the object has lost its original NewClass name. Like that: In arrray[6] lost NewClass name. So is there any way I can keep the NewClass name for that object? Here is my function to handle this array: }, [selectedL…
Sum all similar keys in an array with a random number of keys and array items
My Array (can have several items, and there can be multiple ‘keys’ other than ‘companyName’): randomKey and randomKey2 are only examples. The key names can be anything and there can be 1 or more in each array item. Expected results: companyName: ‘X’ is a fixed value, and al…
How to get value from an input field from a class of input fields?
I wrote a code that contains several input fields of number type. They all have the same class and can have different values. But when I want to get a value from one of the input fields, the console log returns an undefined. Why’s that happening, and how to resolve this issue? Code: JS CSS HTML Answer v…
How to button clicked using playwright testing framework?
Currently , i am doing an end to end testing in my nuxt project. I want to test the frontend of my project to ensure the UI is presentable and clickable. However , I am facing a problem for my button. It felt like button is not clicked. I am pretty sure the css selector for my button is correctly
Odd “Uncaught (in promise) TypeError: can’t convert 50057 to BigInt” error with WebAssembly
I am trying to interface with WebAssembly and am getting a weird error. Firefox DevTools shows it as follows: Uncaught (in promise) TypeError: can’t convert 50057 to BigInt The code that runs right before this error occurs: The WebAssembly files being used here were originally being used in a system int…
Can’t get Vue 3 child component to properly recognize prop data
I have a parent and child component in Vue 3. I’m using the options (old) API. I am passing data, an object with a bunch of different properties and values, as a prop like this: When I do this, I get TypeError: Cannot read properties undefined (reading ‘isCustomizable’). Seems like maybe Vue…
I can’t take the information of my result of fetch. Promise
When I try to take the result of my API I can’t. my code: the code that calls the function the full code: not return anything. My route works fine. The problem isn’t in the backend. if I try to delete the async and await, the return is a Promise. If I use the async and await did never return
Spring /login?error after authorization attempt
I’m new in spring boot. Creating my own website. There was a problem logging in to the app. I’ve tried different methods, I don’t understand what the problem is. When entering an http request, this request appears http://localhost:8088/login?error and displays the Invalid email and password …
How to pass “this” and another variable in EventListener?
I have a function in my addEventListener (#btn-1) that I want to remove eventually. I know that saving the function to a variable is the way to do it, but passing the “this” won’t work unless it’s wrapped in a function, which in turn won’t be able to be removed now because itR…