Posts by Gabriel Santos • 401 points
19 posts
-
1
votes2
answers532
viewsA: How to render html inside a functional component in React?
You need to add an external HTML, right? You can use the dangerouslySetInnerHTML <Card cardHeader={cardTitle} cardBody={object} > <div dangerouslySetInnerHTML={{ html: ` <div…
-
0
votes2
answers72
viewsA: Javascript help
Missing two points ( : ) after each case switch (num) { case 1: document.getElementById('mes').innerHTML = "Janeiro"; break; }…
-
8
votes3
answers3708
viewsA: What is the difference between useMemo and React useCallback?
The difference between the two is that the useCallback is not executed in the surrender while the useMemois. This creates the possibility to "save" the function to be used only by callbacks for…
-
1
votes1
answer112
viewsA: How to import existing Packages into the same directory in a Nodejs application
You need to ride a Monorepo. The tools that will help you with this are as follows:: Yarn Workspaces Lerna About the Yarn Workspaces Yarn Workspaces serves to manage projects with multiple projects,…
node.jsanswered Gabriel Santos 401 -
1
votes2
answers40
viewsA: Why does this component created with function not work?
In the example of function vc is importing React with destructing and not as default change of: import { React } from "react"; for: import React from "react";…
-
0
votes1
answer11
viewsA: How to center vertically elements of a menu
flex display in container with align-items: center .container { display: flex; align-items: center; } or, if you need more cross-browser, inline-block display in Childrens with vertical-align:…
-
0
votes1
answer459
viewsA: How to pass props through the router React
You can use an object instead of a string in the 'to' and so you can send props via the state property <Link to={{ path: '/login' state: { someData: [] } }} />…
reactanswered Gabriel Santos 401 -
3
votes1
answer189
viewsA: How to concatenate two React components?
From what I understand you do not want to concatenate components (which is not possible to do in React), you need to display one component after another dynamically, right? Vc can place the…
-
0
votes1
answer1853
viewsA: Consume data and make Dynamic Form with React
You are doing the operation in the wrong place, so your render will not update after you finish the search. You need a state variable (can be the 'formInfo') and search within a life cycle hook…
-
0
votes1
answer120
viewsA: Close modal Ant Design with ESC
This behavior should be occurring by default, make sure you are not passing prop Keyboard false, if you are you can omit or pass it as true. According to the documentation: Keyboard:Boolean ->…
-
0
votes1
answer940
viewsA: How to change the style of a <Textfield /> from Material UI
The Textfield is a wrapper of Input. To change the layout, I advise you to use the Input directly, using the prop "classes" with the help of API of classes they provide at the end of the page about…
-
0
votes1
answer398
viewsA: How can I hide a Component when the login search is completed
You need a state to control the style or change a class, I made an example by changing the style directly: import React, { Component } from 'react'; import axios from 'axios'; class Login extends…
-
0
votes1
answer139
viewsA: Javascript function inside a Loop For PHP
You can print the tr of the table with a class and a date attribute and then add the events via javascript, like this: (You don’t need onClick here) <tr align='center' class='show'…
-
2
votes2
answers671
viewsA: Search javascript input value
Hello, I don’t know if I understood it very well, but I’ll try to help, I did the following function: document.getElementById('send').onclick = function() { checkNumber(300); } function…
javascriptanswered Gabriel Santos 401 -
0
votes2
answers367
viewsA: blank space between div and div because of hidden fields
Use the display, with visibility the element will continue occupying space even with Hidden document.getElementById("bt1").style.display = "none";
javascriptanswered Gabriel Santos 401 -
1
votes1
answer148
viewsA: How to scroll position div by an image
To do the same with a div, you can insert an attribute like "data-href" and base on it. It would look like this: $('.classe_da_div'). on('click', Function(Event) { var target = $(…
-
-2
votes1
answer64
viewsA: Partially change a page via Javascript
I believe it is because you put the function inside the onload of the page. Try to put inside a setInterval without onload, like this: var interval = setInterval(Ajax(), 10);
-
0
votes1
answer175
viewsA: Radio Carousel Radio Uttons
Try to take the class out of all Abels before. This should work: $('input[name=pack]').on('click', function() { $('.owl-item').find('.product').removeClass('active'); if( $(this).is(':checked') ) {…
-
1
votes3
answers244
viewsA: Numerical counter
From what I understand, you want to record this information in a database, right ? If yes, you will need a server language (such as PHP, Ruby etc) and not jQuery. Take a look at this link:…