Category "javascript"

Toasty does not autoclose or manual close after hook list

I modified the code to generate a toast stack into a ToastContainer dynamically as a notification system. Now the toast do not autoclose even in close button cl

Why is this variable from the Redux store not in the `this.props` on React page?

I have a variable that I believe is correctly written to my Redux store using a Redux action and reducer. But for some reason it never becomes part of the props

Sequelize query returning the wrong number of rows when models are included (findAndCountAll)

The following code should return 12 rows (req.query.limit = 12). This works fine if I don't include any associated rows, but when I include the related models i

How to tell the Highcharts renderer to make the viewport bigger?

In the past I have drawn tables below the chart based on the series. This works because I can tell Highcharts to vertically align the legend, move it to the le

Creating service in React Typescript using axios

There are two different ways to create a service and call from the required funtional component. 1. export const userProfileService = { ResetPassword: asyn

Differentiating custom Typescript Interfaces that have the same fields

I have a custom interface like this: interface Pointer<T> { id: string } id is a pointer to other data structures, but the id field doesn't contain inf

how to stop multiple notifications changing positions?

i have a small notifications problem, when i insert a element the position of first element is changing so i wanna make it when the element is inserted the firs

How to do a simple string token replacement in Azure pipelines?

In a YAML release pipeline, I need to do a simple replacement in the js files contained in the artifact coming from another pipeline. These files have a certain

The best way to implement override data state from parent class

I'm facing a really hard problem. I want to create a wrapper class that can do something like "override" the state of the child without affecting the child's st

Is it possible to prevent higher order function execution in Jest test, if passed callback is a mock?

I have a function which makes a lot of calculations and returns order of sorting. For that function I have tests. Then, that function is used inside of JS nativ

Pino-tee logs twice on other logs

References: https://github.com/pinojs/pino-tee I have two logs, info.log and error.log but the thing is, when I go to info.log, the log for error.log is there S

Prevent scroll bar to go up when click mobile nav

I have a mobile nav and I open it using this code in JS file: var toggleButton = document.querySelector(".toggle-button"); var mobileNav = document.querySel

How to tell the browser to do the javascript manipulated webpage scaling before any content starts to show up?

I am building a website for me and I care about performance, speed, user experience and a lot more. When I started I didn't know much and I made an initial desi

How to retrieve all rows using Azure Table Storage bindings for Azure Functions

I am using azure table storage bindings as described here https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-table-input?tabs=in-

looping through an array of objects that contains three key, value pairs

I have these objects, which could be in an array, like in the example or a database: [ { "payer": "DANNON", "points": 1000, "timestamp": "2020-11-02T14:00:0

Using an async function in Array.find()

It seems I'm unable to use an async function as the first argument to Array.find(). I can't see why this code would not work what is happening under the hood?

Using this JS function, how can I store in a SQL database TMDB fields?

I'm currently developing a project that will be Client on Java and Admin on PHP. For this purpose, I would like to store the API's data in a SQL database, so th

Socket.IO cannot establish a connection

I use socket.io-client for Javascript server on JAVA and when I enter address 'ws://10.201.223.67:9902/' the request is not by 'ws' but by 'http'. It returns

URQL WSS connection with GraphQL-WS says error 4500

import { createClient, defaultExchanges,dedupExchange, cacheExchange, fetchExchange, subscriptionExchange, gql } from "@urql/core"; import { createClie

import { withAuthenticator } from '@aws-amplify/ui-react' error

I'm trying to complete a type-along and I keep receiving an error for authentication when trying to upload images as an object. Here is the link of the type-alo