Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing all 138134 articles
Browse latest View live
↧

Find index of object array

I'm stuck with the code. I actually want to find the index of elements in dataLayer using typescript/javascript.track: { products }, dataLayers: { current: { cart: { items } } } products?: IProduct[]...

View Article


Image may be NSFW.
Clik here to view.

FBSDK: Cannot read property loginwithreadpermissions of undefined

I'm setting up a React Native project using the FBSDK for login purpose.Here's what I've done so far: I ran npm install react-native-fbsdk --saveI ran react-native linkI followed each step mentioned...

View Article


Javascript addEventListener Callback logic

I am following a Javascript video tutorial in which we are learning about event- listeners. We coded the following small web app that lets you input elements on a list:var button =...

View Article

How do you inject a function exported from a local file into puppeteer using...

I have two files, both in typescript: puppeteer.ts and async-some.ts.async-some.ts imports another file that contains an async version of the some function.// async-some.ts import { someP } from...

View Article

Child window not closing

So we have one bug that is affecting mobile devices only and only occurs when the following happens: When you click on a link that opens up a new window (in mobile) if your browser intercepts it with a...

View Article


Recursive function to find top level parent given an id

Given the following data set:const accounts = [ {id: 2, children: [1,22,69], parentId: null}, {id: 3, children: [140, 122, 580], parentId: null}, {id: 1, children: [4,5,6], parentId: 2}, {id: 22,...

View Article

React hooks function dependency

I am finding myself in a weird situation. I am implementing an hook and I cannot manage to achieve what I want.I have something like this:const appHook = props => { const [foo, setFoo] =...

View Article

JQuery find and closest Can't find closest input fields

I loop through some data dynamically via Ajax and than display them in table. As you see I have multiple row or <tr> , HeaderLine and Customerinfo. which I'm interesting in is CustomerInfo and...

View Article


Napi::ObjectWrap: is a destructor called and how?

I'm building an addon for node.js thanks to the node-addon-api.Each of my 'traditionals' C++ classes is wrapping a C object. Then my Napi::ObjectWrap classes wrap these C++ objects.my_object ->...

View Article


Image may be NSFW.
Clik here to view.

Spacing Issue in ReadMore Option

Hi, I implemented the 'read more' option in coding as the 'react-native-read-more-text' dependence , Here I facing the space issue when the ReadMore Ooption is enabled. How to remove(or)Hide the space...

View Article

Raw printing with Electron app

I want to create a electron app that support raw printing.Any suggestion about a library or path that I can take will be appreciated.I did a little bit of research but nothing seems to be up to date. I...

View Article

explicit-function-return-type creating functional component react in typescript

const App: FC = () => { const addItem = () => { useState([...items, {id:1,name:'something']) } return<div>hello</div> } linter gave me error, on my App.tsx.warning Missing return type...

View Article

How to call a python function from a Javascript in a Webpage

I write the html code as bellow,<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> </head>...

View Article


How can I use dragula library to drag and fit external events on fullcalendar?

I'm trying to code a task manager where I'll have events on a external container. That's working for now, but I need that when droping an event between tho existing events on the calendar dynamicaly...

View Article

Image may be NSFW.
Clik here to view.

How to pass Array to IFrame Element in Vue.js?

i need to pass an array to iframe window in vue. Before this, I managed to pass data to iFrame base on an answer in stackoverflow but the solution won't work for Array. Here's how i tried:Vue Last...

View Article


Node.js Parsing Multiple Page PDFs with different sections

I have a large pdf where I need to pull all the instances of ID#. I currently have it setup where I can parse the first page correctly but ignores ever other section in the document. Also I have...

View Article

Image may be NSFW.
Clik here to view.

Angular Dom:- Add missing cells(td) to angular material calendar

I am trying to add missing cells in angular material calendar. Below is my html<mat-calendar [dateClass]="dateClass()" [startAt]="month" [selected]="selectedDate"...

View Article


Data won't appear: Cannot read property 'slice' of undefined

I'm trying to display some data from an API but I'm receiving an error. I was able to print it to the console but not onto the web page as HTML. The error I'm receiving is: Cannot read property 'slice'...

View Article

React with TypeScript: Type is not assignable to type 'IntrinsicAttributes'

I have a component in React that shows a pagination of products. I cannot figure out why I am getting this error when I'm trying to run the application:React with TypeScript: Type '{ postsPerPage:...

View Article

Image may be NSFW.
Clik here to view.

PrivateRoute on React is not redirecting when loggedIn user is false

I'm trying to implement some security into my app and ended up creating this code:import React from 'react'; import { Route, Redirect } from 'react-router-dom'; import PropTypes from 'prop-types';...

View Article
Browsing all 138134 articles
Browse latest View live