Category "javascript"

Linting not working eslint-plugin-vue for .vue with <script src="./TheAloha.js">

If i have 3 files: TheAloha.vue, TheAloha.html, TheAloha.js, linting don't work for TheAloha.js. TheAloha.vue <template src="./TheAloha.html"></templat

Accept confirm in Webview React Native

I've a React Native app (with expo) that has a Webview that I used with injectedJavascript to go through a login an do some stuff. The thing is in one part, the

I am trying to filter on date and reduce the response and do .push to my Data array. But i get error on push cannot assign numbers to strings

This is the the data[] that I want to do push on reduce. const data = [{ 'Date': '', 'AssignedA': 0, 'ConsumedA': 0, 'AssignedB': 0, 'Co

The KeyboardAvoidingView is not behaving the way I want it to

So the code for my login screen is import { StyleSheet, Text, View, StatusBar, SafeAreaView, TextInput, ImageBackground, KeyboardAvoidingView, }

Abstract type classes/interfaces in typescript

Is it possible to have superclasses/interfaces and subclasses/implementations that depict the typing in an abstract way? Lets say you have types and following f

Markdown Double Table issue

I wrote a one javascript markdown editor. When I click twice the table, 2 tables are create. But I have some problem for that. That tables are merging. How to a

How to define Type of dynamically added global variables for Intellisense

I am defining four global variables from a forEach loop using a line similar to this: global[name] = buffer with buffer being the type from node.js and current

BokehJS FreehandDrawTool does not plot line when dragging mouse in canvas

In BokehJS 2.4.2 the FreehandDrawTool documentation is showing in the toolbar, but no line is drawn when dragging the mouse in the canvas. Here is a minimal exa

Ajax chained dropdown not loading/working correctly on the LIVE server

I have a country, state and city chained dropdown which loads a state depending on the country and loads the cities depending on the state. The code works perfe

Hydration error due to if statement in Next.js [duplicate]

I am getting three errors due to the if statement in my _app.js file. Error: Hydration failed because the initial UI does not match what was r

Changing video-background based on weather description using React

I am trying to have it so that the video background of my weather app will change based on the weather condition using React. This is my App.js import React

"Warning: Cannot update a component" when creating a user with Firebase react hooks

In my React App I want to create a user with Firebase react hooks using createUserWithEmailAndPassword authentication but I get these errors. Error 1 POST http

Why can't I directly modify a component's state, really?

I understand that React tutorials and documentation warn in no uncertain terms that state should not be directly mutated and that everything should go through s

Javascript share sessionStorage among tabs

I am using Javascript with Chrome and I need to share the sessionStorage content among different tabs. I know that i could use localStorage but I don't want to

Select products indiviudally in react js

the component holds a bootstrap cart inside and my button is rendered inside that cart to be specific. how to edit each one of the buttons individually enter im

How to load a 3D model with Collada using NASA Web World Wind?

I’ve been working with NASA’s World Wind library and I am currently trying to display a 3D model of a tree on top of the globe. I am following this

How to add if statement in arrow function

i'm a beginner in JS and was wondering what is the syntax of an arrow function with an if statement with a regular function such as function getStringLength(str

How to type unique letters only in input text box in html or react?

I want to create an input box that allows to type only a distinct alphabet letter in the input box ( No duplicate alphabet value, ONLY ONE) I looked up all the

How to add styles to individual elements in react using e.target, when a button is clicked?

I am trying to add styles to the inidividual elements. I want when an individual div( is clicked to make sure that the paragraph of the specific changes from d

Material UI DropDown Focus Remove

I want to remove the focus background color for the target dropdown <Dropdown options={branding} fullWidth id