Category "javascript"

Yup validation for nested form elements in formik

I have a nested Formik form which has checkbox in every new set of form fields added. I am trying to add validation in Yup to achieve: Atleast one checkbox to b

How do I unsubscribe to the dispatch to grab new data onload on useEffect? - I'm using Redux Toolkit

I can load my data but only after I refresh the page. Until then, it shows the data from the previous item I clicked on. It's behaving like a cache would. Here

Destructuring Nested objects in javascript | Destructure second level parent and child Objects

I need to destructure and get values of title, child, childTitle from this object const obj1 = { title : 'foo', child : { title2 : 'bar' } } le

How to use Zabbix's CurlHttpRequest() in JavaScript?

I am learning Zabbix. I would like to use CurlHttpRequest() and all these functions: I can't find the documentation (what's going on inside). I would like to r

Twilio Screen Share - Microphone on macos

I follow up the below link to add screen share functionality in my app. https://www.twilio.com/blog/screen-sharing-javascript-twilio-programmable-video But when

How to read gamepad values in the playstation browser using usb, bluetooth or gamepad api?

I tried connecting the gamepad with the ps browser, but the browser gives me an error, that navigator.bluetooth and navigator.usb are undefined. It's easier to

getResult is Undefined

I can't seem to find out what is creating this undefined error in my basic rock paper scissor game it gives me to results instead of just one I'm trying to unde

How do I make puppeteer select google translate text box for me? it only works if I click it myself

my code is as follows await page.waitForTimeout(1000); await page.waitForSelector( "#yDmH0d > c-wiz > div > div.WFnNle > c-wiz > div.OlSOob

how to run javascript function in selenuim

how i can run this js code in selenuim window.hcaptcha.render = (container, params) => { console.log(container) console.log(params) window.hcaptchaCallback =

Error: Uncaught TypeError: Failed to resolve module specifier "web3". Relative references must start with either "/", "./", or "../"

I have installed web3 using npm in my project. I now have a web3 folder in my node_modules folder. However, when I run my code on local server, it shows the fol

how to run javascript function in selenuim

how i can run this js code in selenuim window.hcaptcha.render = (container, params) => { console.log(container) console.log(params) window.hcaptchaCallback =

ReactJs and Wordpress api is there a way to upload media

I am using ReactJs for my frontend and I am trying to upload a image to my backend which is Wordpress. Currently I am able to create post, pages, and do other t

Firestore V9 Sorting Field by array of objects. Being shuffled on update

In my app, I have lists. these lists are categorized. Each category is stored into Firestore as a doc, along with an array of objects under that doc. The item O

cann't decrease a value by one in the UI with node.js mongodb, react

I am trying to update a value in the UI. When I click to update, I have a button that will decrease by one In the database and be displayed in the UI's quantity

How can I change dynamically the Width and Height to my Lottie in React?

I'm working on a web app builded in Django and React, I've a question about to change the width and height of my Lottie img when the screen change Its size. Tha

How to preview component with react portal using storybook.js

I implemented a Popper component using popper.js, and I used React's Portal to render popper element. And now I want to preview my popper component, but It fail

D3.js display chart segment data on click

First time posting so please bear with me. I'm playing around with D3.js and charts at the moment and having trouble getting a working onclick function to displ

Mongoose - get all requried fields only from the schema

I want to apply validation on controller level similar to what we have in a Form Request in Laravel but I want that in Node JS. I want to know the required fiel

Javascript doesn't Run Without Refresh After Submitting Form Using Turbolinks

I have some javascript that puts click handlers on buttons (for instance). Since those buttons don't exist when the user first visits the app at, say, the "Home

Translating a specific Promise from Javascript to Python

I am trying to translate this piece of code from Javascript to Python but could not find an equivalent of a Promise and an async function in Python. async funct