Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

231
Vistas
How to display the function result in the table after pressing the button?

I created a table, button and input using chakra ui. I want the function executed after "onClick" to display its result in a table. My main problem is the use of useState (). I'm not sure if I'm doing it right. There is no attempt to "enter" the function result into the table in the code. When I tried such solutions, the web application did not load. Please help

  Moralis.start({ serverUrl, appId, masterKey });

  const query2 = new Moralis.Query('SpaceMissionsStarted');

  const [inputValue, setInputValue] = useState('');

  const tableRow = document.getElementById('event');

  function findAddress() {
    const query2 = new Moralis.Query('SpaceMissionsStarted');
    query2.equalTo('senderAddress', inputValue);
  }

  return (
    <ChakraProvider theme={theme}>
      <Box textAlign="center" fontSize="xl">
        <TableContainer>
          <Table
            variant="striped"
            colorScheme="telegram"
            size="sm"
            mt={5}
            maxW="500px"
            ml={300}
          >
            <TableCaption>
              SpaceMission Started Events Query Finder
            </TableCaption>
            <Thead>
              <Tr>
                <Th>Event name</Th>
                <Th>into</Th>
                <Th isNumeric>multiply by</Th>
              </Tr>
            </Thead>
            <Tbody>
              <Tr>
                <Td>...</Td>
                <Td>...)</Td>
                <Td isNumeric>...</Td>
              </Tr>
              <Tr>
                <Td>...</Td>
                <Td>..</Td>
                <Td isNumeric>...</Td>
              </Tr>
            </Tbody>
            <Tfoot>
              <Tr>
                <Th>Event name</Th>
                <Th id="event"></Th>
                <Th isNumeric>..</Th>
              </Tr>
            </Tfoot>
          </Table>
        </TableContainer>
        <Input
          placeholder="address"
          maxWidth="300px"
          onChange={e => setInputValue(e.target.value)}
        />
        <Button
          colorScheme="telegram"
          ml={50}
          onClick={findAddress}
          id="button"
        >
          Find
        </Button>
      </Box>
    </ChakraProvider>
about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda