Front-end: After return(): Service.js: Controller.js: So, this page of my web-app serves to show a list of all the companies saved in my database. I created a filter that allows you to show only those of a certain type, via findByType. I would like to insert other filters such as: findByRevenue, findByEmploye…
Tag: javascript
deleting object keys which start with a vowel js
I need to remove all keys, which start with the vowel from an object but I can’t figure out how to do it. This is what I have so far. In this example only the ‘chip’ key should stay and all the others should be removed. Can you guys help me with this? Answer You need to return your object
I get an Error from React: Maximum update depth exceeded
I wrote my codes and i think everything is right but i get an error from react.js Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops. App.js: User…
How to get the position information of a value of an array inside loop
I need to get the information of a position of an array inside the loop. I’ve two variables. So, the array would be look like this according to the value of i (in loop): Now, I’ve to produce an array of information. Detailed architecture of this is here: I wan’t to prepare this positions arr…
How to update nested array in React state?
I am trying to update my state so that a nested array gets emptied but the rest of the state stays the same. My state object looks like: And I the closest I get to working is: The console warning I get with this approach is: But how else is this possible? Many thanks 🙂 Answer The first problem I
Why can’t I acces a static function in a static Object from the same Class?
i’m learning extends Class in javascript with narrow function class. In the Cards Class: I’ve made an static Object and i can’t have acces to the static variable this.number from the Object info, precisely in “function”. Can you give me a way to have access to static variable. I …
How to allow access to photos for your web app in firebase
How can I authorise my app to be able to access images in my firebase storage without the user having to sign in? Should I just remove all read protections in the security rules for images, or is there a better way to do this altogether? For context this is so that the app can load images on the home
How to achieve a maintainable, reactive UI with vanilla JS
today I’ve got a problem which would be easily solved by using a reactive and state managed framework like Vue. Sadly, its not posssible to use it. Following (simplified) situation (link to codepen): We’ve got a server rendered page which has a price field. It has the opportunity to add or remove …
Target specific folder with Gatsby and allImageSharp context
I’m a beginner on Gatsby. I try to display a batch of images in grid from a specific folder. I find a script to do that, but that’s catch all pics from my data folder and my purpose is target a specific one. I try a script but that’s don’t work with allImageSharp when I try to filter t…
JS, How to change only parent element
I have something like that : Generaly, I use js to change text on my html elements : But do something like this remove my span element on title. Then, is it possible to change only the text on h3 ? I know, i can do something like that: But is not my goal. Answer You can try this: