All Questions
Tagged with updates javascript
137
questions
0
votes
0
answers
41
views
DOM update incomplete in D3 when used with React
I have a problem updating the DOM elements in D3 in a React Component.
I have a component which gets data from a Slider in the main App.
The slider filters the data, removing or adding elements. When ...
1
vote
0
answers
26
views
I can't add a new Row to an inline crud table once i get live data
I am trying to create an inline create and edit function on a table in angular, when i click on 'add', a new row with empty input fields is supposed to be created. works well on mock data but wont ...
0
votes
2
answers
1k
views
Angular7 Ng-Multiselect-dropdown Its Adding Dynamically but not updating
<ng-multiselect-dropdown
[settings]="settings"
name="cuisine"
[placeholder]="'select '"
[(ngModel)]="data1"
...
0
votes
1
answer
293
views
How to update angular component variable in 'then'
I would like to wait till angComponent.gridApi does not have the value undefined.
I'm not sure, but I think the variable angComponent doesn't update.
cy.getAngularComponent(tableGrid).then((...
0
votes
0
answers
392
views
Attempted import error: 'CardAction' is not exported from '@material-ui/core'
I'm working on a react app and I'm trying to import CardAction from @material-ui but then:
Attempted import error: 'CardAction' is not exported from '@material-ui/core'.
So obviously I went to ...
3
votes
6
answers
2k
views
When to use functional update form of useState() hook, eg. setX(x=>x+1)
Normally when we need to update a state in a functional component, we do something like this:
function Example() {
const [count, setCount] = React.useState(0);
return (<div><p>You ...
0
votes
3
answers
211
views
javascript setTimeout in a while loop [duplicate]
Hello i want to have 4 timeOuts to update balls positions because the balls don't go at the same speed.
here's a part of my code:
var i=1;
while(i<=5)
{
console.log(i);
...
2
votes
1
answer
480
views
UpdateMany document with array of objects in mongodb
I have a mongodb collection which looks like this
[
{
pId: "p1",
apikey: "a2",
count: 0
},
{
pId: "p2",
apikey: "...
0
votes
1
answer
29
views
when i push the button again the information will be updated not added
How to change my code, when I push the button again the information is adding to previous, I need that when I push the button the information updates.
document.querySelector(".city-select&...
1
vote
3
answers
199
views
Modify object value in array inside map
Trying to modify object value in array on condition on some arrays the override does not work, here is my snippet
const removeAction = (target, array, name) => {
let mutation = JSON.parse(...
0
votes
1
answer
36
views
problems to update mongodb collection
so I have two different collections for my social media app. One for the users and the other one for the user's posts. Whenever I'm updating the info from one of my user's collection it should also ...
2
votes
3
answers
2k
views
TextInput in FlatList Item
I have a problem like picture below:
Text
As you guy can see I have info on every item: name and stock. Now I want to update stock on single item by type a number to text Input But when I type 3 into ...
3
votes
2
answers
4k
views
How to update an IndexedDB item with autoincrement key? [duplicate]
I created an object store with autoIncrement: db.createObjectStore("items", {autoIncrement:true});
Now I want to be able to update an item given its key and a new value, so I wrote this ...
0
votes
1
answer
81
views
Disable and enable note field depends on note field value null or not
$(document).on('click', '.update', function() {
var user_id = $(this).attr("id");
$.ajax({
url: "fetch_single.php",
method: "POST",
data: {
user_id: ...
0
votes
1
answer
685
views
Mongoose adding product to Cart products array
I've been trying to figure out how to push new product to existing cart which I have in my database.
updateOne is searching for a a cart with claimed userId and then ties to insert new product into ...
2
votes
2
answers
1k
views
React Lifting State Up
I was studying this part of React documentation: https://reactjs.org/docs/lifting-state-up.html.
I have a similar problem in a project of mine, but with a slight difference. We can use the same ...
0
votes
0
answers
465
views
Eclipse Javascript syntax highlighting broken after update?
After the recent Eclipse update (Version 4.17.0, Build 20200910-1200) the syntax highlighting for Javascript files is not working any longer. Furthermore the *.js file association and the Textmate ...
1
vote
1
answer
69
views
Always display update notificaion when using Internet Explorer
I just found this handy site to display notifications to the users to update their browsers if they are obsolete, but on mi site i need to use HTML 5 and Internet Explorer does not support it
Does any ...
1
vote
0
answers
19
views
How update and remove redux state reducer
When I move a user I would like to update new group the reducer and remove user in old groups
/mystate
// groups: [
// {
// users: [
// '1A',
// '1B'
// ],
// id: '2',
// ...
0
votes
3
answers
808
views
How to edit an object inside array using ramda expressions?
I have an array like this :
[
{
id: '1852',
label: 'One',
types: [1, 2, 4]
},
{
id: '1854852',
label: 'Two',
types: [1, 2]
},
{
id: '4581852',
label: 'Three',
...
1
vote
1
answer
31
views
Unable to update data values on mongoDb native findOneAndUpdate query
exports.update_activity_status = (req, res) => {
const {
campaign_id,
leadId,
leadActivity,
status,
} = req.body;
const client = mongoClient.connect(`${process.env.MONGO_URL}`...
1
vote
1
answer
217
views
How to visualise update and later rollback JavaScript update transactions
I have JavaScript program containing two transactions:
T1 -> generate new documents within the database (update statement)
T2 -> transform existing MarkLogic documents
The successful execution of ...
0
votes
1
answer
1k
views
accessing variables from js files to ts
Hi I'm trying to update an existing angular app from version 2 to 9, I'm starting by updating it to angular 4 then continuing later, I was able to update the packages that require updating, but now I'...
1
vote
0
answers
96
views
D3js: How to update children inside <g> when using brush selection?
I'm trying to modify a dataviz layout in order to group a rect and a a below a g element. Display works, but when I updated my brush selection everything go to hell as event that should be remove from ...
1
vote
2
answers
44
views
Update parameter of URL (without refresh)
I know this is a very documented subject but after hours and hours of research I'm now stuck.
I'm making a quiz, and when a choice is made I would like to update the corresponding parameter on the URL....
0
votes
1
answer
60
views
How to filter object and updated what is filtered? JavaScript
I want to filter object and update what is filtered as a result.
E.g:
// global object (parent)
let globalObj = {
id: 123,
name: "No Name",
attributes: [{
keyA: "Key",
...
1
vote
3
answers
875
views
Warning of Do not mutate state directly. Use setState() in reactjs
I'm new to reactjs here is the code in which i want to update the states by using the "=" sign because when i try to update state by using setState method it gives error as I need to update an object ...
0
votes
1
answer
67
views
Update a data when I drag a point
EDIT:
So I edited my post and my code.
With what Justinas told me I changed my code, so I display the info of the 3 points below the div.
But here's the thing, when I move a point, new info is ...
1
vote
1
answer
55
views
Remove (Update query) only particular element in array of array mongodb?
My Input Data
{
_id: 1,
results: [
{ item: "A", score: 5, answers: [ { q: 1, a: 4 }, { q: 2, a: 6 } ] },
{ item: "B", score: 8, answers: [ { q: 1, a: 8 }, { q: 2, a: 9 } ] }
]
}
...
0
votes
1
answer
232
views
Updating value inside of json file
Is it possible to update a value inside of json file when a button is click? For example is this:
{
"caught": "0",
"id": 1,
"location": "River",
"north": "Nov ~ Mar",
"price": 900,...
0
votes
2
answers
659
views
How does having " ?${new Date().getTime()} " updates the image in JS
I watched a tutorial where they showed that appending ?${new Date().getTime()}to the value of src attribute in the image tag, updates the current image with the new image.
I came across this question,...
2
votes
1
answer
2k
views
Converting StackNavigator from v4 to v5 React Native error for auth
My goal is to convert React-Native stack navigator from version 4-5. I've been running into some challenges and any help would be deeply appreciated.
ERROR: "The action 'NAVIGATE' with payload {"name"...
0
votes
0
answers
68
views
Migration to material ui v.4 x x problem with css
i have a difficult task of migrating the material ui version from 0.20 to 4.9.0 (the latest). I've changed all the imports and changes of components but i have a MAJOR problem with the css. We use a ...
0
votes
2
answers
140
views
Error getting document: clientDetails Error: Cannot modify a WriteBatch that has been committed
What is the reason I am getting this error within a Firestore batch update? The promise is returned as a batch commit and the batches are created inside a loop. I could not get my head around this ...
7
votes
0
answers
4k
views
Are there incompatibility risks when updating Node.js?
I was just checking if any installed programs required an update and I realized that the latest LTS version of Node.js is 12.13.1 while I have 10.16.0 installed.
I was wondering if there are ...
1
vote
1
answer
3k
views
how do I fix this problem I'm having with findOneAndUpdate
Trying to update mongodb doc using findOneAndUpdate method
tried looking up the doc in various ways and reformating the update in different ways
router.put(
"/edit",
[
auth,
[
...
0
votes
2
answers
2k
views
Redux Reducer: Update object in array by key immutably
Question: Update the object in devData array with key = 1 this way: -> update data and dateTime
//Redux state:
{
info: {
success: true,
devData: [
{
...
2
votes
1
answer
1k
views
PWA update service worker when app is already loaded
I'm building a PWA and I'm looking for a way to update a service worker when the app is already open and loaded.
For example the user opens the app once on his phone and then switches through other ...
1
vote
2
answers
60
views
Updating elements of a multidimensional array
I'm seeking to update a team results array below. The football score will populate positions 1 and 2 of each inner array.
var teamResults=[
["Home","F","A","Away"],
["A",,,"B"],
["A",,,"C"],
...
0
votes
1
answer
1k
views
JS (template Literal-) generated html, updates the DOM? [duplicate]
When generating HTML with JavaScript, is it better to use the annoyingly verbose
document.createElement("p")...
(as seen here: https://www.w3schools.com/jsref/met_document_createelement.asp )
or is ...
1
vote
1
answer
33
views
Using Javascript arrray in mongodb update query with $in
I am trying to update all documents in my collection which have fields containing any one of the values in my javascript array. I keep getting a '$in needs an array' error. I do not understand how to ...
1
vote
1
answer
1k
views
How to update React Google Map after receive data from server
How to update ReactGoogleMap after receiving data from the server?
This is how I create Google Map using react-google-maps API.
import React from "react"
import { compose, withProps } from "...
7
votes
2
answers
962
views
D3 V4: Updated data is being seen as new data? (Update function)
Currently, I am building a system, and I am having some trouble with the update function.
Essentially, I am trying to add new nodes to a D3 tree. A new child node can be added when the user clicks ...
0
votes
1
answer
151
views
alternative way to change hovered series and its points properties in a HighCharts chart
I have a line chart with a lot of series and I need to change the color of the hovered series and all its points.
A suggested approach is to use mouseOver and mouseOut events, and inside them run a ....
1
vote
0
answers
94
views
three js update tubegeometry not visible r100
I have a function that generates new tube each frame following the movement of a mesh. The function that does the updating of the tubegeometry looks like the following:
function UpdateKettingMeshes(...
0
votes
0
answers
440
views
Highcharts : Real time updating spline chart sets y-axis data to zero
I am trying to display a set of dynamic data in a spline type chart using highcharts.
My spline type line chart has 4 series of data that needs to update through a service call. Service returns an ...
0
votes
1
answer
191
views
Updating a post in Meteor.js
I just recently started to try learning Meteor.js. My intention is to build a newsfeed-feature where I can insert, edit and delete content. I’m stuck at the edit part.
imports/api/news/methods.js
...
1
vote
0
answers
65
views
Create a JSON object updater
I'm working with a specific JSON object in javascript that contains multiple non fixed properties (I mean properties that can change in the future).
I've been working in something like:
{
"...
0
votes
1
answer
98
views
Is it possible to get a list of installed Windows Updates using node.js?
I am working on a project in JavaScript/Node.js and I want to fetch a list of all installed windows updates similar to using the C# WUAPI 2.0 Type Library.
I tried using WMI calls(...
0
votes
2
answers
623
views
Update user information
Tried this for updating user information , only phone number but it's not getting update.
router.post('/edit', checkAuth, function (req, res, next) {
console.log(req.userData.userId)
User....