Category "javascript"

State lost value in bootstrap table

I am using custom fields in react bootstrap table. { dataField: "hours", text: "# of Hours", sort: true, footer: "# of Hours", headerStyle: (colum, c

Next auth getSession with typescript

I am using next-auth getSession in API routes like this const mySession = await getSession({ req }); I am certain that the type of the mySession is this type S

Autodesk Forge - How to get all available family in revit file

I am using Autodesk Forge to build a web app, I want to get categories, families, and family types in the original revit project. I have researched but all I ca

TypeError: Class extends value undefined is not a constructor or null while using stream-browserify

While using stream-browserify to import Transform class and extend it in the code causing the following exception in the browser console AudioUtils.ts:52 Uncaug

Why history on chrome not working when added a new state?

I have pushed some states into browser but when I clicking on the back button browser it can not navigate to previous state. Although, I clicked and hold on the

Every time i refreshes my app it logs out even though i've used this onAuthStateChanged. Below is my code of loading screen

I'm using this screen to navigate between two screens by using the onAuthStateChanged but still every time It refresh the app it logs out even though I'm not lo

How to get numbers to cycle around specific range in JavaScript?

I have this which isn't working, for cycling like 1 2 3 4 5 6 7 8 9 1 2 3 4 ..., cycling between 1 and 9. const cycle = integers => { let i = 0 let x

Trying to refactor React App to React-Redux issue w/ volume slider

I've been doing freecodecamps Drum Machine app. I was able to complete the app completely with React but I made a copy to try and get familiar with using react-

Data-content gets stuck on hover (Bootstrap)

Whenever I hover over an element and data-content shows on hover, if I scroll fast or quickly, the content gets stuck on page even if I scroll. enter image desc

React - .map returning not a function?

I was following this example: https://reactjs.org/docs/faq-ajax.html But my code is returning weather.map is not a function? function App(props) { const [wea

Why does a checkbox get checked after another checkbox above gets removed?

I have an array of my clients' pending requests that I iterate through, creating a div with relevant information for each pending request. Within each div, ther

Shopify asset not loading

I am trying to include a JavaScript file (named StoreLocator.js) from my Shopify assets by using the URL filters as explained in the Shopify documentation (see

question regarding max value in an array with recursion in JavaScript

Currently, I was able to get the following function to retreive the max value from an array through recursion const max = ([a,...rest]) => !rest.length || a

code ERESOLVE when running the command npm install

I'm new to ReactJS and tried to run a code in VS Code using npm install command and this error pops up: npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resol

In SvelteKit, is there a way to cancel a popstate event if user state isn't saved?

I have a component that allows a user to edit their state. This triggers a notSaved variable. I have a beforeunload event handler to handle reload and exiting t

How to define common query params in Redux Toolkit Query

All the endpoints of the API I'm working on, require the same set of query parameters. The user must select these parameters before making requests to endpoints

How to display auth errors with p tag

how to display to user an auth error differently than with alert? For example: User will type a bad password, and a p tag will tell him, that he typed uncorrect

React Modal on deletion of a row in React-Bootstrap-Table-next

I have been trying to implement a modal that will pop up to confirm deletion before a record is deleted in my bootstrap table. I have tried different methods bu

Dynamically add a bookmark on PDF.js Express Viewer

In my web application, I'm using the PDF.js Express Viewer library to preview a PDF file. Despite having read the documentation and made numerous attempts, I am

How to stop the Api icon keep adding when click the buttons?

I have to create a web with two buttons to show each city's information. When I clicked the button the icon would keep adding every each time i click it. I have