I’m trying to pass arrow function which will work as input rules like in Vuetify https://vuetifyjs.com/en/api/v-input/#rules. So I’m passing rules in array with code: Then I want to check It in Stencil component with console log via watcher but It returns undefined: Answer When you want to pass a …
Tag: javascript
How do I add multiple Web pages on my news website and maintain them professionally [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I have been coding a news website and have coded the homepage of it by HTM…
Creating an array from values in a loop
I have a loop that looks like this: Inside of my loop I want to ad a condition that says “If this title is not equal to NONE, add this to an array with all the others. See below my note in the code: Basically what I want to do is, all the “selectionItemTitle” that passes the conditon needs t…
FileReader upload safety
Say I have <input type=”file”> without any forms, and obtain an image selected by this input via File’s Blob javascript API: And that’s all. Say, there is no php script in my server at all. User just uploads picture via the code below, and, for example, see how the picture is displaying in t…
e-mail span drops down after entering invalid e-mail address in the ‘contact’ form
How can I make ‘E-mail’ span stay on the top pink ? Is there anything else I can use instead of ‘valid’? I know that ‘E-mail” span drops down because it is not valid e-mail but even if someone writes invalid e-mail I want it to be still pink on the top but in the same time,…
How to better setup fetch with useEffect?
Im learning JS and React and I came to the code example below and some parts I don’t understand properly. The second .then is inside useUffect is this ok, or it’s better to be in getData func? Also in render there is data**?**.map and I don’t understand why we need ?, is this ternary operato…
bootstrap How do I rearrange the grid like an image?
There are a total of 8 cols here. When the browser size is smaller than the lg breakpoint, I want to make it work like the picture above. But when I tried it, it became like this. I can’t get a sense from my knowledge. Please advise. Answer BS4 uses CSS via class and is based on flex, you do
Vue Showdown Default Classes
I want to achieve the following say i the MD as I want to render it as I was able to achieve this using VueShowdown but I want add default class to every h1 tag like I got something similar to this here. But I don’t know how to use this in Vue. Is it even possible in VueShowdown? Is
Add class active on scroll. Vanilla JS
I’m new to vanilla js. I have a navbar with links to sections. I want to make the class active as soon as the section becomes active. If there are no active section, then remove the active class. Found such a script, but there is one drawback. If I am in an inactive section, the active class will remain…
Axis moving to center of graph after upgrading D3 from v4 to v6
I have just upgraded my d3 version from v4 to v6 and had made no changes to the way I draw my graphs yet. Before when the minimum and maximum data values were all 0 the x-axis at y = 0 would be set on the bottom of the chart which is what I am trying to keep. Now it