Category "javascript"

React Click Counter: Updating State of just one element

This should be pretty simple, but I can't figure out how to do it. I have a component with multiple buttons, each with a "count" value, set with state. When a

Javascript encodeURI not work well with csv

I'm trying generate short CSV by the code bellow : Source const csv_content = `"Hello"þ"World"þ"#"þ"123"`; const href = 'data:attachment/csv;c

How to place an image over iframe using proper css

I am trying to place an image(which is a close button) on iframe at the top-right corner, the iframe and image are loaded from js function in angular, I have pl

Return to same tab after form submit laravel 8

I have a view with multiple tabs. Each having different forms. When I submit a form from one tab, it returns to same page but primary tab. How could I get to re

How to unit test typeorm getRepository with Jest?

I am using typescript with typeorm and i have an repository like this: import { EntityRepository, getRepository, createQueryBuilder } from 'typeorm'; @EntityR

Uncaught Error: Invalid hook call. ReactJs

I am relatively new to react and I am trying to render a leaflet map on my site but I am currently getting an Invalid Hook call error. Any information would be

Reduce height of mat-flat-button

I have a message board that I want to add delete buttons to, unfortunately the mat-flat-button seems to be doubling the height of the message items. If i set it

JQuery content editable div and text box on submit not sending POST

I have a website where you can edit and format text, then you can save it on to the server. I am using jquery to send the data to a PHP page where it will be sa

Jest: test that an array contains none of these values?

I want to verify that a given array doesn't contain any of a list of values. There is expect.arrayContaining but I don't get how it is supposed to be used for t

import the current package export by the package.json name

I'm interested to know if there's a convention that allows a person to test the expected usage of a package from within the package. Consider the following pack

Show an image stream to client in blazor server without javascript?

Right now i have the following lines of code: private async Task SetImageUsingStreamingAsync() { var imageStream = await GetImageStreamAsync(); var dotn

Array.prototype.map() expects a return value from arrow function array-callback-return

Don't really know why it is saying this but this is the code I believe it is talking about setUpdate(text, key) { const items = this.state.items; items.map(

Supabase: Filter data with join and logical 'OR'

I'm using Supabase as a database and trying to implement a full-text search. My example setup is quite simple, I have two tables: items +----+-----------+------

Find rendered newlines position with javascript in textarea

I have this textarea: <textarea id="ifade" rows="6" cols="66" placeholder="...Start Writing in Arabic"></textarea> and I have trying to do find cha

React - react-final-form validation

I have a question regarding react-final form error message when using record-level validation. I have the following field present within FormFilterFields compon

make: *** [Release/obj.target/binding/src/binding.o] Error 1 when using dart sass

Because the node-sass was no longer maintain and did no compatiable with the higher version of node, so I tried to change the node-sass to dart-sass, when I use

Parsing a string to a date in JavaScript

How can I convert a string to a Date object in JavaScript? var st = "date in some format" var dt = new Date(); var dt_st = // st in Date format, same as dt.

How to check if user has a specific token by querying NFTBalances?

I am trying to check if a user has a specific token, in my case token_id should be "87". How can I check that using NFTBalances? I wrote the code below but it i

I am facing an error net::ERR_ABORTED 401 (Unauthorized)

In my componentDidMount function I have a problem. I'm facing error 401 in my Reactjs site, my username and password are correct. componentDidMount() { co

AngularJS: TypeError: Cannot read properties of undefined (reading 'parse') after reset form values

I need to reset an AngularJS form after submitting and receiving a response. But after that I can't use the form, I get an error when I try to enter in any fiel