Skip to content

Tag: javascript

Apply filters to a list and show data

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…

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

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

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 …

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: