React Select Custom SingleValue Button Not Clickable

I am trying to add an edit button (which currently triggers an alert) to my react-select component. However, this makes the newly added button unclickable; instead, it opens the react-select menu. Stopping propagation does not solve the issue.

const CustomOption = (props) => {
  const handleEdit = (e) => {
    e.stopPropagation();
    alert("This is working like I want");
  };

  return (
    <components.Option {...props}>
      <div className="test">
        <span>{props.children}</span>
        <button onClick={handleEdit}>Edit</button>
      </div>
    </components.Option>
  );
};
export default function App() {
  const option = [
    { value: "Spring", label: "Spring" },
    { value: "Summer", label: "Summer" },
    { value: "Autumn", label: "Autumn" },
    { value: "Winter", label: "Winter" },
  ];

  return (
    <div className="App">
      <Select
        className="dropdown"
        options={option}
        components={{ SingleValue: CustomSingleValue }}
      />
    </div>
  );
}

Question: Why doesn’t the button inside CustomSingleValue work (while the one inside CustomOption does), and how can I fix it?

Code SandBox

This is especially frustrating because CustomOption, which uses the exact same code, works fine.

Working vs not working

Full code including working CustomOption:

// This isn't working like I want
const CustomSingleValue = (props) => {
  const handleEdit = (e) => {
    e.stopPropagation();
    alert("This I can't click");
  };

  return (
    <components.SingleValue {...props}>
      <div className="test">
        <span>{props.children}</span>
        <div>
          <button onClick={handleEdit}>Edit</button>
        </div>
      </div>
    </components.SingleValue>
  );
};

// This is working how I want
const CustomOption = (props) => {
  const handleEdit = (e) => {
    e.stopPropagation();
    alert("This is working like I want");
  };

  return (
    <components.Option {...props}>
      <div className="test">
        <span>{props.children}</span>
        <button onClick={handleEdit}>Edit</button>
      </div>
    </components.Option>
  );
};
export default function App() {
  const option = [
    { value: "Spring", label: "Spring" },
    { value: "Summer", label: "Summer" },
    { value: "Autumn", label: "Autumn" },
    { value: "Winter", label: "Winter" },
  ];

  return (
    <div className="App">
      <Select
        className="dropdown"
        options={option}
        placeholder="Click on a option and then try to click the edit button"
        components={{ SingleValue: CustomSingleValue, Option: CustomOption }}
      />
    </div>
  );
}

Flickering when scrolling left when first column frozen DataGrid

When the first column hovers over the combobox it starts to flicker, when I scroll past the checkboxes it disappears completely.
I’ve tried style changes but that doesn’t help, I’ve searched on the internet, I haven’t found anything either. GPT chat doesn’t help either.
What can be done about this?

enter image description here

I have table in react:

import React, { useEffect, useState } from 'react';
import axios from 'axios';
import { DataGrid, GridActionsCellItem } from '@mui/x-data-grid';
import { Button, TextField, Dialog, DialogActions, DialogContent, DialogTitle, Checkbox, Box, MenuItem, Select } from '@mui/material';
import DeleteIcon from '@mui/icons-material/Delete';
import { saveAs } from 'file-saver';
import { tableStyles, columnModel } from './TableStyle'; // Import stylów

const Table = () => {
  const [data, setData] = useState([]);
  const [newRow, setNewRow] = useState({
    nazwa: '',
    comments: '',
    weight: '',
    type: '',
    t: false,
  });
  const [open, setOpen] = useState(false);

  useEffect(() => {
    const fetchData = async () => {
      try {
        const token = localStorage.getItem('token');
        const response = await axios.post(`${process.env.REACT_APP_API_URL}/database`, {
          operation: 'fetch',
        }, {
          headers: {
            Authorization: `Bearer ${token}`,
          },
        });
        const fetchedData = response.data.map((row, index) => ({
          id: row.id || index, // Ensure each row has a unique id
          ...row,
        }));
        setData(fetchedData);
      } catch (err) {
        console.error('Error fetching data', err);
      }
    };

    fetchData();
  }, []);

  const handleEditCellChange = async (newRow) => {
    const updatedRow = data.find((row) => row.id === newRow.id);
    if (updatedRow) {
      try {
        const token = localStorage.getItem('token');
        await axios.post(`${process.env.REACT_APP_API_URL}/database`, {
          operation: 'update',
          id: newRow.id,
          data: newRow,
        }, {
          headers: {
            Authorization: `Bearer ${token}`,
          },
        });
        setData(data.map(row => (row.id === newRow.id ? newRow : row)));
      } catch (err) {
        console.error('Error updating data', err);
      }
    }
    return newRow;
  };

  const handleToggleCheckbox = async (id, field, value) => {
    const updatedRow = data.find((row) => row.id === id);
    if (updatedRow) {
      const updatedData = { ...updatedRow, [field]: value };
      try {
        const token = localStorage.getItem('token');
        await axios.post(`${process.env.REACT_APP_API_URL}/database`, {
          operation: 'update',
          id,
          data: updatedData,
        }, {
          headers: {
            Authorization: `Bearer ${token}`,
          },
        });
        setData(data.map(row => (row.id === id ? updatedData : row)));
      } catch (err) {
        console.error('Error updating data', err);
      }
    }
  };

  const handleSelectChange = async (id, field, value) => {
    const updatedRow = data.find((row) => row.id === id);
    if (updatedRow) {
      const updatedData = { ...updatedRow, [field]: value };
      try {
        const token = localStorage.getItem('token');
        await axios.post(`${process.env.REACT_APP_API_URL}/database`, {
          operation: 'update',
          id,
          data: updatedData,
        }, {
          headers: {
            Authorization: `Bearer ${token}`,
          },
        });
        setData(data.map(row => (row.id === id ? updatedData : row)));
      } catch (err) {
        console.error('Error updating data', err);
      }
    }
  };

  const handleAddRowChange = (e) => {
    const { name, value, type, checked } = e.target;
    setNewRow({
      ...newRow,
      [name]: type === 'checkbox' ? checked : value,
    });
  };

  const handleAddRow = async () => {
    try {
      const token = localStorage.getItem('token');
      const response = await axios.post(`${process.env.REACT_APP_API_URL}/database`, {
        operation: 'add',
        data: newRow,
      }, {
        headers: {
          Authorization: `Bearer ${token}`,
        },
      });
      setData([...data, { ...newRow, id: response.data.id || data.length }]);
      setNewRow({
        nazwa: '',
        comments: '',
        weight: '',
        type: '',
        t: false,
      });
      setOpen(false);
    } catch (err) {
      console.error('Error adding row', err);
    }
  };

  const handleDeleteRow = async (id) => {
    try {
      const token = localStorage.getItem('token');
      await axios.post(`${process.env.REACT_APP_API_URL}/database`, {
        operation: 'delete',
        id,
      }, {
        headers: {
          Authorization: `Bearer ${token}`,
        },
      });
      setData(data.filter(row => row.id !== id));
    } catch (err) {
      console.error('Error deleting data', err);
    }
  };

 const handleDownloadExcel = async () => {
    try {
        const token = localStorage.getItem('token');
        const response = await axios.post(`${process.env.REACT_APP_API_URL}/save-excel`, data, {
            headers: {
                Authorization: `Bearer ${token}`,
            },
            responseType: 'blob',
        });

        const blob = new Blob([response.data], {
            type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
        });
        saveAs(blob, 'data.xlsx');
    } catch (err) {
        console.error('Error downloading Excel file', err);
        alert(`Error downloading Excel file: ${err.message}`);
    }
};


  const getStageOptions = (type) => {
    switch (type) {
      case 'SZK':
        return ['H', 'U', 'S', 'US', 'C', 'CS', 'G', 'D', 'E'];
      case 'TAN':
        return ['300', '250', '200', '150', 'GRAT'];
      case 'ŚK':
        return ['40', '30', '25', 'GRAT', 'MY'];
      default:
        return [];
    }
  };

  const renderStageCell = (params) => {
    const options = getStageOptions(params.row.type);
    return (
      <Box>
        <Select
          value={params.value || ''}
          onChange={(event) => handleSelectChange(params.id, params.field, event.target.value)}
          fullWidth
        >
          {options.map((option) => (
            <MenuItem key={option} value={option}>{option}</MenuItem>
          ))}
        </Select>
      </Box>
    );
  };

  const columns = [
    { 
      field: 'nazwa', 
      headerName: 'Nazwa', 
      width: 200, 
      editable: true,
      cellClassName: 'MuiDataGrid-cell--stickyLeft',  // Klasa dla zablokowanej kolumny
      headerClassName: 'MuiDataGrid-columnHeader--stickyLeft',  // Klasa dla nagłówka zablokowanej kolumny
    },
    { field: 'comments', headerName: 'Comments', width: 120, editable: true },
    { field: 'weight', headerName: 'Weight', width: 80, editable: true },
    { 
      field: 'type', 
      headerName: 'Type', 
      width: 90, 
      editable: false, 
      renderCell: (params) => (
        <Box>
          <Select
            value={params.value}
            onChange={(event) => handleSelectChange(params.id, 'type', event.target.value)}
            fullWidth
          >
            <MenuItem value="SZK">SZK</MenuItem>
            <MenuItem value="TAN">TAN</MenuItem>
            <MenuItem value="ŚK">ŚK</MenuItem>
          </Select>
        </Box>
      )
    },
    { 
      field: 't', 
      headerName: 'T', 
      width: 50, 
      editable: false, 
      type: 'boolean',
      renderCell: (params) => (
        <Box>
          <Checkbox 
            checked={Boolean(params.value)} 
            onChange={(event) => handleToggleCheckbox(params.id, params.field, event.target.checked)} 
          />
        </Box>
      )
    },
    ...Array.from({ length: 20 }, (_, i) => ({ field: `stage1_${i + 1}`, headerName: `${i + 1}`, width: 90, editable: true, renderCell: renderStageCell })),
    ...Array.from({ length: 15 }, (_, i) => ({ field: `stage2_${i + 1}`, headerName: `${i + 1}`, width: 90, editable: true, renderCell: renderStageCell })),
    {
      field: 'actions',
      type: 'actions',
      width: 100,
      getActions: (params) => [
        <GridActionsCellItem
          icon={<DeleteIcon />}
          label="Delete"
          onClick={() => handleDeleteRow(params.id)}
        />
      ]
    }
  ];

  return (
    <div style={{ height: '100%', width: '100%' }}>
      <Box sx={{ height: '100%', width: '100%' }}>
        <DataGrid
          rows={data}
          columns={columns}
          processRowUpdate={handleEditCellChange}
          columnGroupingModel={columnModel}
          sx={tableStyles.root} // Użycie stylów z osobnego pliku
          pinnedColumns={{ left: ['nazwa'] }} // Przypięcie pierwszej kolumny do lewej strony
        />
      </Box>
      <Button variant="contained" color="primary" onClick={() => setOpen(true)} style={{ marginTop: 20 }}>
        Add Row
      </Button>
      <Button variant="contained" color="secondary" onClick={handleDownloadExcel} style={{ marginTop: 20, marginLeft: 20 }}>
        Download Excel
      </Button>
      <Dialog open={open} onClose={() => setOpen(false)}>
        <DialogTitle>Add New Row</DialogTitle>
        <DialogContent>
          <TextField
            autoFocus
            margin="dense"
            name="nazwa"
            label="Nazwa"
            type="text"
            fullWidth
            value={newRow.nazwa}
            onChange={handleAddRowChange}
          />
          <TextField
            margin="dense"
            name="comments"
            label="Comments"
            type="text"
            fullWidth
            value={newRow.comments}
            onChange={handleAddRowChange}
          />
          <TextField
            margin="dense"
            name="weight"
            label="Weight"
            type="text"
            fullWidth
            value={newRow.weight}
            onChange={handleAddRowChange}
          />
          <Select
            name="type"
            value={newRow.type}
            onChange={handleAddRowChange}
            fullWidth
          >
            <MenuItem value="SZK">SZK</MenuItem>
            <MenuItem value="TAN">TAN</MenuItem>
            <MenuItem value="ŚK">ŚK</MenuItem>
          </Select>
          <Checkbox
            name="t"
            checked={newRow.t}
            onChange={handleAddRowChange}
          /> T
        </DialogContent>
        <DialogActions>
          <Button onClick={() => setOpen(false)} color="primary">
            Cancel
          </Button>
          <Button onClick={handleAddRow} color="primary">
            Add
          </Button>
        </DialogActions>
      </Dialog>
    </div>
  );
};

export default Table;

and style for this:

export const tableStyles = {
  root: {
    '& .MuiDataGrid-root': {
      scrollSnapType: 'x mandatory',
    },
    '& .MuiDataGrid-row': {
      scrollSnapAlign: 'start',
    },
    '& .MuiDataGrid-row:nth-of-type(odd)': {
      backgroundColor: '#f5f5f5', // Alternatywne kolory wierszy
    },
    '& .MuiDataGrid-cell--stickyLeft': {
      position: 'sticky',
      left: 0,
      backgroundColor: 'white',
      zIndex: 1, // Zmniejszenie z-index
      borderRight: '1px solid #ddd',
    },
    '& .MuiDataGrid-columnHeaders .MuiDataGrid-columnHeader--stickyLeft': {
      position: 'sticky',
      left: 0,
      backgroundColor: 'white',
      zIndex: 1, // Zmniejszenie z-index
      borderRight: '1px solid #ddd',
    },
    '& .MuiDataGrid-cell:not(.MuiDataGrid-cell--stickyLeft)': {
      zIndex: 0, // Ustawienie z-index: 0 dla wszystkich komórek poza pierwszą kolumną
    },
    '& .MuiDataGrid-cell:not(.MuiDataGrid-cell--stickyLeft) *': {
      zIndex: 0, // Ustawienie z-index: 0 dla wszystkich elementów wewnątrz komórek poza pierwszą kolumną
    },
    '& .MuiDataGrid-columnHeaders .MuiDataGrid-columnHeader:not(.MuiDataGrid-columnHeader--stickyLeft)': {
      zIndex: 0, // Ustawienie z-index: 0 dla nagłówków kolumn innych niż pierwsza
    },
    '& .MuiDataGrid-columnHeaders .MuiDataGrid-columnHeader:not(.MuiDataGrid-columnHeader--stickyLeft) *': {
      zIndex: 0, // Ustawienie z-index: 0 dla wszystkich elementów wewnątrz nagłówków kolumn innych niż pierwsza
    },
    '& .MuiDataGrid-columnHeaderTitleContainer.MuiDataGrid-withBorderColor': {
      zIndex: 0, // Ustawienie z-index: 0 dla obiektów o klasie MuiDataGrid-columnHeaderTitleContainer MuiDataGrid-withBorderColor
    },
    '& .MuiDataGrid-columnHeaderTitleContainer.MuiDataGrid-withBorderColor *': {
      zIndex: 0, // Ustawienie z-index: 0 dla zawartości obiektów o klasie MuiDataGrid-columnHeaderTitleContainer MuiDataGrid-withBorderColor
    },
  },
};

Pentaho HTTP Post error “Name may not be null”

I have some issues with a HTTP post step in Pentaho. If I preview it works, and does the post acuratly, however when I properly run the transformation I get this error (in the HTTP post step). The thing is there is no name field at all in the HTTP step that corresponds to the issue.

I’ve tried to run a single post, multiple posts, iterrations. Same outcome when “Run”, no error occures when I do a “preview”. Changed the payload to minimum, etc. When I preview it post the action accuratly. I don’t believe it is an issue of the payload it self, I think the step somehow bugs out.

I’ve tried Pentaho 9.0 and 9.4.

Error log:

2024/08/14 09:00:39 - Carte - Installing timer to purge stale objects after 1440 minutes.
2024/08/14 09:00:52 - Spoon - Running transformation using the Kettle execution engine
2024/08/14 09:00:52 - Spoon - Transformation opened.
2024/08/14 09:00:52 - Spoon - Launching transformation [true_post_iterrative]...
2024/08/14 09:00:52 - Spoon - Started the transformation execution.
2024/08/14 09:00:53 - true_post_iterrative - Dispatching started for transformation [true_post_iterrative]
2024/08/14 09:00:53 - url.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0)
2024/08/14 09:00:53 - Microsoft Excel input.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2024/08/14 09:00:53 - Modified JavaScript value.0 - Optimization level set to 9.
2024/08/14 09:00:54 - Modified JavaScript value.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2024/08/14 09:00:54 - Add constants.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2024/08/14 09:00:54 - Merge join.0 - Finished processing (I=0, O=0, R=2, W=1, U=0, E=0)
2024/08/14 09:00:54 - HTTP post.0 - ERROR (version 9.2.0.0-290, build 9.2.0.0-290 from 2021-06-02 06.36.08 by buildguy) : Unexpected error
2024/08/14 09:00:54 - HTTP post.0 - ERROR (version 9.2.0.0-290, build 9.2.0.0-290 from 2021-06-02 06.36.08 by buildguy) : java.lang.IllegalArgumentException: Name may not be null
2024/08/14 09:00:54 - HTTP post.0 -     at org.apache.http.util.Args.notNull(Args.java:54)
2024/08/14 09:00:54 - HTTP post.0 -     at org.apache.http.message.BasicNameValuePair.<init>(BasicNameValuePair.java:59)
2024/08/14 09:00:54 - HTTP post.0 -     at org.pentaho.di.trans.steps.httppost.HTTPPOST.processRow(HTTPPOST.java:436)
2024/08/14 09:00:54 - HTTP post.0 -     at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2024/08/14 09:00:54 - HTTP post.0 -     at java.lang.Thread.run(Unknown Source)
2024/08/14 09:00:54 - HTTP post.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
2024/08/14 09:00:54 - true_post_iterrative - Transformation detected one or more steps with errors.
2024/08/14 09:00:54 - true_post_iterrative - Transformation is killing the other steps!
2024/08/14 09:00:54 - Select values.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2024/08/14 09:00:54 - Dummy (do nothing) 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2024/08/14 09:00:54 - true_post_iterrative - ERROR (version 9.2.0.0-290, build 9.2.0.0-290 from 2021-06-02 06.36.08 by buildguy) : Errors detected!
2024/08/14 09:00:54 - Spoon - The transformation has finished!!
2024/08/14 09:00:54 - true_post_iterrative - ERROR (version 9.2.0.0-290, build 9.2.0.0-290 from 2021-06-02 06.36.08 by buildguy) : Errors detected!
2024/08/14 09:00:54 - true_post_iterrative - ERROR (version 9.2.0.0-290, build 9.2.0.0-290 from 2021-06-02 06.36.08 by buildguy) : Errors detected!

Bootstrap 5 navbar expands but on 2nd tap on toggler not collapsing the content in Laravel 8

I was utilizing Boostrap’s navbar collapse feature, on testing it in w3schools editor it worked and when i used it in my Laravel 8 project the Navbar Expands but on another interaction on Navbar Toggle it doesn’t collapse the content / shrink it back.

Below i posted the Screenshot

Navbar Collapse Bootstrap 5

Bootstrap SDN’s

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>

Code:

  <button class="navbar navbar-toggler" type="button" data-bs-toggle="collapse" 
data-bs-target="#collapseTarget" aria-controls="navbarSupportedContent" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span></button>

<div class="collapse" id="collapseTarget">
    <ul class="navbar-nav me-auto">
    <li> <a href="">Wishlist</a> </li> <li> <a href="">SigIn</a> </li> <li> <a href="">Language</a> </li> </ul></div>

Why is my projects card not getting any smaller after the screen size reaches 911 px by 911 px?

I am making a page to show my projects. It works fine on desktop and I am currently trying to make the page responsive. I am using Next.js and tailwindcss. I was able to make the page responsive up until screen sizes of 911 px by 911 px or less. Once I reach the screen size, the projects stay the same size. I wam trying to figure out why they are not shrinking futher.

Project.js code:

import AnimatedText from "@/components/AnimatedText";
import { GithubIcon } from "@/components/Icons";
import Layout from "@/components/Layout";
import Head from "next/head";
import Image from "next/image";
import Link from "next/link";
import React from "react";
import project1 from "../../public/images/projects/keyword-search.png";
import project2 from "../../public/images/projects/lexflow.png";
import project3 from "../../public/images/projects/project-citizen.png";
import project4 from "../../public/images/projects/aclu-archives.png";

const FeaturedProject = ({ type, title, summary, img, link, github }) => {
  return (
    <article
      className="w-full flex items-center justify-between relative rounder-br-2xl
    rounded-3xl border border-solid border-dark bg-light shadow-2xl p-12 dark:bg-dark dark:border-light
    lg:flex-col lg:p-9 xs:rounded-2xl xs:rounded-br-3xl xs:p-4
    "
    >
      <div
        className="absolute top-0 -right-3 -z-10 w-[101%] h-[103%] rounded-[2.5rem] bg-dark dark:bg-light
      rounded-br-3xl xs:-right-2 sm:h-[102%] xs:w-full xs:rounded-[1.5rem]
      "
      />
      <Link
        href={link}
        target="_blank"
        className="w-1/2 cursor-pointer overflow-hidden rounded-lg
        lg:w-full
        "
      >
        <Image
          src={img}
          alt={title}
          className="w-full h-auto transition-transform duration-300 transform hover:scale-105"
          priority
          sizes="(max-width: 768 px) 100vw, (max-width: 1200px) 50vw, 50vw"
        />
      </Link>

      <div
        className="w-1/2 flex flex-col items-start justify-between pl-6
      lg:w-full lg:pl-0 lg:pt-6
      "
      >
        <span
          className="text-primary font-medium text-xl dark:text-primaryDark
        xs:text-base
        "
        >
          {type}
        </span>
        <Link
          href={link}
          target="_blank"
          className="hover:underline underline-offset-2"
        >
          <h2
            className="my-2 w-full text-left text-4xl font-bold dark:text-light
          sm:text-sm
          "
          >
            {title}
          </h2>
        </Link>
        <p
          className="my-2 font-medium text-dark dark:text-light
        sm:text-sm
        "
        >
          {summary}
        </p>
        <div className="mt-2 flex items-center">
          <Link href={github} target="_blank" className="w-10">
            <GithubIcon />
          </Link>
          <Link
            href={link}
            target="_blank"
            className="ml-4 rounded-lg bg-dark text-light p-2 px-6 text-lg font-semibold dark:bg-light dark:text-dark
            sm:px-4 sm:text-base
            "
          >
            Visit Project
          </Link>
        </div>
      </div>
    </article>
  );
};

const FeaturedProjectNoGit = ({ type, title, summary, img, link }) => {
  return (
    <article
      className="w-full flex items-center justify-between relative rounder-br-2xl
    rounded-3xl border border-solid border-dark bg-light shadow-2xl p-12 dark:bg-dark dark:border-light
    lg:flex-col lg:p-9 xs:rounded-2xl xs:rounded-br-3xl xs:p-4
    "
    >
      <div
        className="absolute top-0 -right-3 -z-10 w-[101%] h-[103%] rounded-[2.5rem] bg-dark dark:bg-light
      rounded-br-3xl xs:-right-2 sm:h-[102%] xs:w-full xs:rounded-[1.5rem]
      "
      />
      <Link
        href={link}
        target="_blank"
        className="w-1/2 cursor-pointer overflow-hidden rounded-lg
        lg:w-full
        "
      >
        <Image
          src={img}
          alt={title}
          className="w-full h-auto transition-transform duration-300 transform hover:scale-105"
          priority
          sizes="(max-width: 768 px) 100vw, (max-width: 1200px) 50vw, 50vw"
        />
      </Link>

      <div
        className="w-1/2 flex flex-col items-start justify-between pl-6
      lg:w-full lg:pl-0 lg:pt-6
      "
      >
        <span
          className="text-primary font-medium text-xl dark:text-primaryDark
        xs:text-base
        "
        >
          {type}
        </span>
        <Link
          href={link}
          target="_blank"
          className="hover:underline underline-offset-2"
        >
          <h2
            className="my-2 w-full text-left text-4xl font-bold dark:text-light
          sm:text-sm
          "
          >
            {title}
          </h2>
        </Link>
        <p
          className="my-2 font-medium text-dark dark:text-light
        sm:text-sm
        "
        >
          {summary}
        </p>
        <div className="mt-2 flex items-center">
          <Link
            href={link}
            target="_blank"
            className="ml-4 rounded-lg bg-dark text-light p-2 px-6 text-lg font-semibold dark:bg-light dark:text-dark
            sm:px-4 sm:text-base
            "
          >
            Visit Project
          </Link>
        </div>
      </div>
    </article>
  );
};

const Project = ({ type, title, img, link, github }) => {
  return (
    <article
      className="w-full flex flex-col items-center justify-center rounded-2xl
    border border-solid border-dark bg-light p-6 relative dark:bg-dark dark:border-light
    xs:p-4
    "
    >
      <div
        className="absolute top-0 -right-3 -z-10 w-[101%] h-[103%] rounded-[2rem] bg-dark
      rounded-br-3xl dark:bg-light
      md:-right-2 md:w-[101%] xs:h-[102%] xs:rounded-[1.5rem]
      "
      />

      <Link
        href={link}
        target="_blank"
        className="w-full cursor-pointer overflow-hidden rounded-lg"
      >
        <Image
          src={img}
          alt={title}
          className="w-full h-auto transition-transform duration-300 transform hover:scale-105"
        />
      </Link>

      <div className="w-full flex flex-col items-start justify-between mt-4">
        <span
          className="text-primary dark:text-primaryDark font-medium text-xl
        lg:text-lg md:text-base
        "
        >
          {type}
        </span>
        <Link
          href={link}
          target="_blank"
          className="hover:underline underline-offset-2"
        >
          <h2 className="my-2 w-full text-left text-4xl font-bold lg:text-2xl">
            {title}
          </h2>
        </Link>
        <div className="w-full mt-2 flex items-center justify-between">
          <Link
            href={link}
            target="_blank"
            className="text-lg font-semibold underline
            md:text-base
            "
          >
            Visit
          </Link>
          <Link
            href={github}
            target="_blank"
            className="w-8
          md:w-6
          "
          >
            <GithubIcon />
          </Link>
        </div>
      </div>
    </article>
  );
};

const projects = () => {
  return (
    <>
      <Head>
        <title>Projects - </title>
        <meta
          name="Projects Page for "
          content="Technology, Computer Science, Law, Coding, Web Development, Student, High School, Stanford, UPenn, Github"
        />
      </Head>
      <main className="w-full mb-16 flex flex-col items-center justify-center dark:text-light">
        <Layout className="pt-16">
          <AnimatedText
            text="I'm not a businessman, I'm a business, man."
            className="mb-16
            lg:!text-7xl sm:mb-8 sm:!text-6xl xs:!text-4xl
            "
          />

          <div
            className="grid grid-cols-12 gap-24 gap-y-32
          xl:gap-x-16 lg:gap-x-8 md:gap-y-24 md:gap sm:gap-x-0
          "
          >
            <div className="col-span-12">
              <FeaturedProject
                title="Competition Cases Keyword Search"
                img={project1}
                summary="A index where you can search keywords related to return market definitions decided in European Commission competition cases."
                link="/"
                github="/"
                type="Featured Project"
              />
            </div>
            <div className="col-span-6 sm:col-span-12">
              <Project
                title="LexFlow"
                img={project2}
                link="/"
                github="/"
                type="Featured Project"
              />
            </div>
            <div className="col-span-6 sm:col-span-12">
              <Project
                title="Project Citizen"
                img={project3}
                link="/l"
                github="/"
                type="Website"
              />
            </div>
            <div className="col-span-12">
              <FeaturedProjectNoGit
                title="ACLU of Delaware Archives"
                img={project4}
                summary="The ACLU of Delaware Archives preserves the organization's history and ongoing efforts to protect civil liberties in Delaware.
                These archives showcase important legal cases, campaigns, and advocacy efforts the ACLU has worked on, including education
                reform and voting rights. The archives serve as a resource for understanding the impact of the ACLU's work in Delaware over
                the years."
                link="https://www.aclu-de.org/en/archives"
                type="Archival Project"
              />
            </div>
            {/* //TODO: add another featured project */}
            {/* <div className="col-span-12">Featured Project</div> */}
            {/* //TODO: add another project */}
            {/* <div className="col-span-6">Project-4</div> */}
          </div>
        </Layout>
      </main>
    </>[![[![enter image description here](https://i.sstatic.net/trkhVCXy.png)](https://i.sstatic.net/trkhVCXy.png)](https://i.sstatic.net/yr6xYOt0.png)](https://i.sstatic.net/yr6xYOt0.png)
  );
};

export default projects;
[![enter image description here](https://i.sstatic.net/j3vpz8Fd.png)](https://i.sstatic.net/j3vpz8Fd.png)

I’ve tried changing the width, the gaps, the columns, and the grid layout but nothing worked. Either I made the wrong changes or I was making changes in the wrong place.

[This is what a project on my projects page currently looks like on an Iphone 14 Pro.]
[This is what a project on my projects page should look like on an Iphone 14 Pro.

UI is not same in firefox

I am making an extension using Plasmo React, and while the UI looks exactly how I want it in Chrome, but it doesn’t look the same in Firefox.

I tried the problem is this meta tag is adding in chrome but not seeing this firefox. I think UI is not same in firefox because of this .

match() not working with regex expression

    const contentWithVideo = `
<p><br></p>
<video style="max-width: 50%; height: auto;" controls="">
  <source src="http://chartbeat-datastream-storage.s3.ap-south-1.amazonaws.com/wp-content/uploads/2024/08/1723616374/SampleVideo_1280x720_30mb.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>`;

    // Find the <video> tag with its source URL
    const videoTagRegex = /<video[^>]*>s*<sources+src=['"]([^'"]+)['"]s+type=['"]([^'"]+)['"][^>]*>s*</video>/is;

    // Using exec() to match the content
    const matchResult = videoTagRegex.exec(contentWithVideo);

the code must match the video tag in given variable but its returning null

  • i have tried various methods but nothing is working
    if anyone understand where i m going worng please let me know

i have tried changing the expression at first but soon i understand match() is not working with regex

Error 404 (Not found) when connecting the frontend and backend parts in React. What to do?

I made a feedback form, the client server is working well separately. But when they were combined on the same host when you click send (request feedback by mail ) an error is coming out. Swears at the line in Hero.jsx const response = await fetch("/api/feedback", {

backend server.js

const express = require('express'); 
const nodemailer = require('nodemailer'); 

const server = express();


server.use(express.static(__dirname + '/public'));
server.use(express.json());


server.get('/', (req, res) => {
    res.sendFile("public/index.html", { root: __dirname})
})


server.post("/api/feedback", async(req, res) => {
    try {

     const transporter = nodemailer.createTransport({
        host: "smtp.mail.ru",
        port: 465,
        secure: true,
        auth: {
            user: "[email protected]",
            pass: "**********"  
        }
     });   

     const { name, phone, message} = req.body;

     await transporter.sendMail({
        from: "[email protected]",
        to: "[email protected]",
        subject: "Тема письма",
        text: `${name} ${phone} ${message}`,
        html: 
        `
        <p>${name}</p>
        <p>${phone}</p>
        <p>${message}</p>
        `


     });

     return res.status(200).send({
        status: 200,
        message: 'Успешня отправка'
     })

    } catch (e) {
        return res.status(500).send({
            status:500,
            message: 'Ошибка при запросе'
        });
    } 
})


server.listen(5000, () => {

    console.log('listening on port 5000'); 

})

script.js

const FEEDBACK_FORM = document.querySelector('#feedback-form');

function sendFeedback(feedback) {
    fetch("/api/feedback" , {
        method: 'POST',
        headers: {
            "Content-Type": "application/json"
        },
        body: JSON.stringify(feedback),
    }).then((response)=>response.json()).then(data => {
        console.log(data);
        alert('Успешно');
    }).catch((error) => {
        console.error(error);
        alert('Ошибка');
    });
}

FEEDBACK_FORM.addEventListener('submit', (e) => {
    e.preventDefault();
    const feedbackFormData = new FormData(e.target);
    console.log('feedbackFormData', feedbackFormData);
    const feedback = Object.fromEntries(feedbackFormData);
    console.log('feedback', feedback);

    sendFeedback(feedback);
})

Front Hero.jsx

import React, { useState } from "react";
import styles from "./Hero.module.css";
import { getImageUrl } from "../../utils";

export const Hero = () => {
  const [isOpen, setIsOpen] = useState(false);
  const [formData, setFormData] = useState({
    name: "",
    phone: "",
    message: ""
  });

  const openModal = () => {
    setIsOpen(true);
  };

  const closeModal = () => {
    setIsOpen(false);
  };

  const handleCall = () => {
    window.location.href = "tel:**************";
  };

  const handleFormSubmit = async (e) => {
    e.preventDefault();
    try {
      const response = await fetch("/api/feedback", {
        method: 'POST',
        headers: {
          "Content-Type": "application/json"
        },
        body: JSON.stringify(formData),
      });
      
      if (response.ok) {
        alert('Успешно');
        setFormData({
          name: "",
          phone: "",
          message: ""
        });
      } else {
        alert('Ошибка');
      }
    } catch (error) {
      console.error(error);
      alert('Ошибка');
    }
  };

  const handleChange = (e) => {
    const { name, value } = e.target;
    setFormData((prevData) => ({
      ...prevData,
      [name]: value
    }));
  };

  return (
    <section className={styles.container}>
      <div className={styles.content}>
        <h1 className={styles.title}>*********</h1>
        <p className={styles.description}>
          «Ya» 
        </p>
        <a href="tel:+**********" className={styles.contactBtn} onClick={handleCall}>
          Позвонить
        </a>
        <button onClick={openModal} className={styles.contactBTN}>
          Оставить заявку
        </button>
        {isOpen && (
          <form onSubmit={handleFormSubmit}>
            <input
              type="text"
              name="name"
              value={formData.name}
              onChange={handleChange}
              placeholder="Имя"
            />
            <input
              type="tel"
              name="phone"
              value={formData.phone}
              onChange={handleChange}
              placeholder="Телефон"
            />
            <textarea
              name="message"
              value={formData.message}
              onChange={handleChange}
              placeholder="Сообщение"
            />
            <button type="submit">Отправить</button>
          </form>
        )}
      </div>
      <img
        src={getImageUrl("hero/heroImage.png")}
        alt="Hero image of me"
        className={styles.heroImg}
      />
      <div className={styles.topBlur} />
      <div className={styles.bottomBlur} />
    </section>
  );
};

export default Hero;

I tried a lot of things To help solve the problem

How to hide the checkboxes of the parent node in the dxTreeList?

I need to hide the parent node’s checkbox (Boolean cell) in the tree List.
I use DevExpress with jQuery. I am new to this tech. Kindly anyone help me out to solve this problem with efficient way.

I have searched for the solutions through the internet. If I implement them, I have to restructure my saving mechanism of the dxTreeList. I used the built-in checkbox (Boolean cell), but the resources say to use the cell template with custom checkbox.

My code implementation:

dataSource: dataForControls,
id: "id",
parentId: "parentId",
editing: {
   mode: "batch",
   allowAdding: false,
   allowUpdating: true,
   allowDeleting: false,
},
columns: [
   { dataField: "pageName", caption: "Page / Control", allowEditing: false },
   { dataField: "pageAccess", caption: "Has Access", allowEditing: true, dataType: "boolean",
}
]

I need to hide the checkbox of the parent node.

Converting JSON data into JS array [duplicate]

I’ve searched JSON guides for a while and all I find is always those that “explain” this like so:

let jsonString = {Item: "Text"};

let jsObject = JSON.parse(jsonString);

While there clearly isn’t any connection of some sort between creating JS OBJECTS and fetching JSON STRINGS.

They don’t even show how to use this method Live with an actual JSON file.

I tried to do that myself in many ways but I can’t figure this out.

How to actually convert JSON STRINGS into JS OBJECTS/ARRAYS – using the JSON fetch() method?

First try:

let inputField = document.getElementById('input');

// FIRST TRY:
fetch(`a.json`)
    .then(function (response) {
        return response.json();
    })
    .then(function (data) {
        console.log(data);

        // THIS (DESIRED WAY) DOES NOT WORK:
        // let array = JSON.parse(data);

        // console.log('this is the new way');
        // console.log(array);
        // console.log('---- ---- ---- ----');
        // THIS (DESIRED WAY) DOES NOT WORK ^^

        // AS YOU CAN SEE: 'data' DOES NOT ACT AS AN ARRAY:
        // for (let a = 0; a < data.length; a++) {
        //     let p = document.createElement('p');

        //     p.textContent = data[a];
        //     inputField.appendChild(p);
        // };
        // AS YOU CAN SEE: 'data' DOES NOT ACT AS AN ARRAY ^^

        // THIS (OLD WAY) DOES WORK:
        // for (let item of data) {
        //     const part1 = document.createElement('span');
        //     part1.textContent = item.part1;
        //     inputField.appendChild(part1);
        // };
        // THIS (OLD WAY) DOES WORK ^^
    });

Second try:

let jso = fetch(`a.json`)
    .then(function (response) {
        return response.json();
    })
    .then(function (data) {
        console.log(data);

        // THIS (DESIRED WAY) DOES NOT WORK:
        // let array = JSON.parse(data);

        // console.log('this is the new way');
        // console.log(array);
        // console.log('---- ---- ---- ----');
        // THIS (DESIRED WAY) DOES NOT WORK ^^

        // AS YOU CAN SEE: 'data' DOES NOT ACT AS AN ARRAY:
        // for (let a = 0; a < data.length; a++) {
        //     let p = document.createElement('p');

        //     p.textContent = data[a];
        //     inputField.appendChild(p);
        // };
        // AS YOU CAN SEE: 'data' DOES NOT ACT AS AN ARRAY ^^

        // THIS (OLD WAY) DOES WORK:
        // for (let item of data) {
        //     const part1 = document.createElement('span');
        //     part1.textContent = item.part1;
        //     inputField.appendChild(part1);
        // };
        // THIS (OLD WAY) DOES WORK ^^
    });

    let array = JSON.parse(jso);

        console.log('this is the new way');
        console.log(array);
        console.log('---- ---- ---- ----');
// SECOND TRY ^^

JSON file:

[
    {
        "Item": "Text"
    }
]

HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Document</title>
</head>
<body>
    <div id="input"></div>

    <script src="a.js"></script>
</body>
</html>

Animate accordion panel using tailwind classes

I want to add Tailwind classes to animate the opening and closing of the accordion in the code below. I’ve added all the classes, but it doesn’t have any animation. How can I achieve what I want?

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Accordion Example</title>
    <script>
      function toggleAccordionContent(element) {
        const content = element.nextElementSibling;

        if (content.classList.contains('hidden')) {
          content.classList.remove('hidden');
          content.classList.remove('max-h-0', 'opacity-0');
          content.classList.add('max-h-screen', 'opacity-100');
        } else {
          content.classList.add('hidden');
          content.classList.add('max-h-0', 'opacity-0');
          content.classList.remove('max-h-screen', 'opacity-100');
        }
      }
    </script>
    <link
      href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css"
      rel="stylesheet"
    />
  </head>
  <body>
    <div id="accordion" class="space-y-4">
      <!-- Accordion Item -->
      <div
        class="group accordion-item-wrapper example-class border border-gray-300 rounded-lg"
      >
        <div
          role="button"
          class="accordion-summary block w-full p-4 transition-all duration-300 ease-in-out example-summary-class bg-gray-100 hover:bg-gray-200 cursor-pointer"
          onclick="toggleAccordionContent(this)"
        >
          <!-- Chevron or other content goes here -->
          <span class="font-semibold">Accordion Title</span>
        </div>
        <div
          data-collapse="collapse-1"
          class="hidden custom-accordion-content overflow-hidden transition-all duration-700 ease-in-out max-h-0 opacity-0 example-content-class"
        >
          <div class="p-4 bg-white">
            <!-- Content goes here -->
            <p>
              This is the content inside the accordion. You can place any HTML
              content here.
            </p>
          </div>
        </div>
      </div>
      <!-- Repeat above block for additional accordion items -->
    </div>
  </body>
</html>

Multi-Select FileField is not returning list of files based on the order i selected them

I am trying to upload multiple images at once using the filefield xtype but when I get the list of selected files, the list is not in the order I selected them in. It looks to be automatically sorting them based on some other criteria. Is there a way to get list of file names based on the order I selected them?

xtype: 'filefield',
id: 'figureFileUpload',
buttonText: 'Browse Files From Device',
handler: 'onBrowseFiles',
buttonOnly: true,
multiple: true,
height: 45,
listeners: {
    change: 'figureFilefieldChange',
    render: function (me, eOpts) {
        var el = document.getElementById(me.id+'-button-fileInputEl');
        if(me.multiple) {
            el.multiple = true;
        }
    }
}

Getting a not a function error inside

Currently working on a project but getting an error that the code used is not a function which is inside a <form></form>

Our project is a simple registration with auto compute function where in when I input the value on the attendee count, it would automatically show the value below the registration, it also has a view function for us to view the form first before we hit the submit button

<html>
<head>
    <title>Registration Form</title>
    <meta name="viewport" content="width=device-width">
    <link href="C:UsersAdminDesktopRegistration1galvanRegistration111.css" rel="stylesheet" type="text/css">
</head>

<script language="javascript">

function viewInput()
    {
        document.getElementById("KEG1").innerHTML = document.getElementById("KFname").value;
        document.getElementById("KEG2").innerHTML = document.getElementById("KLname").value;
        document.getElementById("KEG3").innerHTML = document.getElementById("KEmail").value;
        document.getElementById("KEG4").innerHTML = document.getElementById("KArea").value;
        document.getElementById("KEG5").innerHTML = document.getElementById("KPtn").value;
        document.getElementById("KEG6").innerHTML = document.getElementById("KAddress").value;
        document.getElementById("KEG7").innerHTML = document.getElementById("KCity").value;
        document.getElementById("KEG8").innerHTML = document.getElementById("KState").value;
        document.getElementById("KEG9").innerHTML = document.getElementById("KZip").value;
        document.getElementById("KEG10").innerHTML = document.getElementById("KCountry").value;
        document.getElementById("KEG11").innerHTML = document.getElementById("KCompany").value;
        
    }

    var numOne, numTwo, res, temp;
function compute()
{
  numOne = parseInt(document.getElementById("value1").value);
  numTwo = parseInt(document.getElementById("KAttendee").value);
  if(numOne && numTwo)
  {
    temp = document.getElementById("res");
    temp.style.display = "block";
    res = numOne * numTwo;
    document.getElementById("compute").value = "$" + res;
  }
}

function checkforblank() {

if (document.getElementById('KFname').value == "") {
    alert('Please enter your FIRST NAME');

    return false;   
}

if (document.getElementById('KLname').value == "") {
    alert('Please enter your LAST NAME');
    return false;
}

if (document.getElementById('KEmail').value == "") {
    alert('Please enter your EMAIL ADDRESS');
    return false;
}

if (document.getElementById('KArea').value == "") {
    alert('Please enter the AREA CODE');
    return false;
}

if (document.getElementById('KPtn').value == "") {
    alert('Please enter your PHONE NUMBER');
    return false;
}

if (document.getElementById('KAddress').value == "") {
    alert('Please enter your ADDRESS');
    return false;
}

if (document.getElementById('KCity').value == "") {
    alert('Please enter your CITY');
    return false;
}

if (document.getElementById('KState').value == "") {
    alert('Please enter your STATE');
    return false;
}

if (document.getElementById('KZip').value == "") {
    alert('Please enter the ZIP CODE');
    return false;
}

if (document.getElementById('KCountry').value == "") {
    alert('Please enter your COUNTRY');
    return false;
}

if (document.getElementById('KCompany').value == "") {
    alert('Please enter the name of the COMPANY');
    return false;
}

if (document.getElementById('KAttendee').value == "") {
    alert('Please enter the count of ATTENDEES');
    return false;
}

}

</script>

<body style="background-color: #ccd1d1"; text-align="MIDDLE">

<h1>Registration Form</h1>


<form method="post" action="C:UsersAdminDesktopRegistration1galvanMainPage.html" >
<table Name="Full Name">
 
<tr>
    <td><label>Full Name :</label></td>
    <td><input required type="text" id="KFname"><br></td>
    <td><input required type="text" id="KLname"><br></td>
</tr>

<tr>
    <td><label></label></td>
    <td><label class="lowerTxt">First Name</label></td>
    <td><label class="lowerTxt">Last Name</label></td>
</tr>
</table>

<table Name="Email">
<tr>
    <td><label>E-Mail :</label></td>
    <td><input type="text" class="long" id="KEmail"><br></td>
</tr>
    
<tr>
    <td><label></label></td>
    <td><label class="lowerTxt">[email protected]</label></td>
    </tr>
</table>

<table Name="Phone Number" Class="TablePhone">
<tr>
    <td><label>Phone Number :</label></td>
    <td><input type="number" id="KArea"
        oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" maxlength="3"><br></td>
    <td><input type="number" id="KPtn"
        oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" maxlength="10"><br></td>
</tr>
    
<tr>
    <td><label></label></td>
    <td><label class="lowerTxt">Area Code</label></td>
    <td><label class="lowerTxt">Phone Number</label></td>
</tr>
</table>

<table Name="TableAddress">
<tr>
    <td><label>Address :</label></td>
    <td><input type="text" class="long" id="KAddress"><br></td>
</tr>
    
<tr>
    <td><label></label></td>
    <td><label class="lowerTxt">Street Address</label></td>
</tr>
</table>    

<table Name="TableCity">
<tr>
    <td><label></label></td>
    <td><input type="text" id="KCity"><br></td>
    <td><input type="text" id="KState"><br></td>
</tr>

<tr>
    <td><label></label></td>
    <td><label class="lowerTxt">City</label></td>
    <td><label class="lowerTxt">State/Province</label></td>
</tr>
</table>

<table class="TableZip">
<tr>
    <td><label></label></td>
    <td><input type="number" id="KZip"
        oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" maxlength="4"><br></td>
    <td><input type="text" id="KCountry"><br></td>
</tr>
    
<tr>
    <td><label></label></td>
    <td><label class="lowerTxt">Postal/Zip Code</label></td>
    <td><label class="lowerTxt">Country</label></td>
</tr>
</table>

<table Name="Company">
<tr>
    <td><label>Company Name :</label></td>
    <td><input type="text" class="long" id="KCompany"><br></td>
</tr>
</table>

<table Name="Attendee">
<tr>
    <td><label>Attendee Count :</label></td>
    <input id="value1" type="hidden" value="500">
    <td class="dollar">$500 x <input type="number" class="value2" id="KAttendee"
        oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" maxlength="2" min='1' max='10'
        onclick="compute()" onkeyup="compute()" required></td>
</tr>
<tr>
    <td><label></label></td>
    <td class="Max">Max 10 Attendee</td>
</tr>
    

<script for ="value2">
        document.getElementsByClassName('value2')[0].oninput = function () {
        var max = parseInt(this.max);
        if (parseInt(this.value) > max) {
            this.value = max; 
        }
    }
</script>
</tr>
</table>

<br>

<div Name="Button1">
    <button class="Button1" type="submit" value="VIEW" onclick="viewInput(), checkforblank(); return false">VIEW</button>
</div>




<br>

<h1>Your Information</h1>

<div name="viewform">
    <p><label class="info1">FIRST NAME:</label>
    <span class="info2" id='KEG1' style="text-transform: uppercase;"></span></p>
    
    <p><label class="info1">LAST NAME:</label>
    <span class="info2" id='KEG2' style="text-transform: uppercase;"></span></p>
        
    <p><label class="info1">EMAIL:</label>
    <span class="info2" id='KEG3' style="text-transform: uppercase;"></span></p>
        
    <p><label class="info1">PHONE NUMBER:</label>
    <span class="info2" id='KEG4' style="text-transform: uppercase;"></span>
    <span class="info2" id='KEG5' style="text-transform: uppercase;"></span>
    </p>
        
    <p><label class="info1">ADDRESS:</label>
    <span class="info2" id='KEG6' style="text-transform: uppercase;"></span>
    <span class="info2" id='KEG7' style="text-transform: uppercase;"></span>
    <span class="info2" id='KEG8' style="text-transform: uppercase;"></span>
    <span class="info2" id='KEG9' style="text-transform: uppercase;"></span>
    <span class="info2" id='KEG10' style="text-transform: uppercase;"></span>
    </p>
        
    <p><label class="info1">COMPANY NAME:</label>
    <span class="info2" id='KEG11' style="text-transform: uppercase;"></span></p>
        
    <p><label class="info1">ATTENDEE COUNT:</label>
    <span class="info2" id='KEG12' style="text-transform: uppercase;"></span>
    </p>

    <p id="res"><label class="info1">TOTAL AMOUNT:</label>
    <input class="add" id="compute">
    </p>
</div>

<br>

<div Name="Button2">
    <input class="Button2" type="submit" onclick="viewInput()">
</div>


</form>
</body>

</html>

With Material UI Text Field of type number, how to make the spin buttons darker?

I am creating a number Text Field with Material UI, and it is not using my theme for the colors of the spin buttons.

Here is the example code from the Material UI docs and a screenshot of it on their site:

<TextField
  id="outlined-number"
  label="Number"
  type="number"
  InputLabelProps={{
    shrink: true,
  }}
/>

Material UI docs site example number TextField

Here is the screenshot from my React app when I copy and paste their example:

Material UI number TextField in my test app

My reproducible example code has two files, App.js and ThemeUtil.js.

App.js:

import React from 'react';

import darkTheme, {lightTheme, ThemeContext} from "./ThemeUtil";
import {Box, CssBaseline, TextField, ThemeProvider} from "@mui/material";

function App() {
  const initialTheme = localStorage.getItem('theme') === 'light' ? lightTheme : darkTheme;

  const [theme, setTheme] = React.useState(initialTheme);

  const toggleTheme = () => {
    setTheme(prevTheme => {
      const newTheme = prevTheme === darkTheme ? lightTheme : darkTheme
      localStorage.setItem('theme', newTheme === darkTheme ? 'dark' : 'light');

      return newTheme;
    });
  }

  return (
      <ThemeContext.Provider value={{theme, toggleTheme}}>
        <ThemeProvider theme={theme}>
            <CssBaseline/>
            <Box className={"TestAppContainer"} sx={{display: "flex", justifyContent: "center", alignItems: "center", width: "100vw", height: "100vh"}}>
                <TextField
                    label="Number"
                    type="number"
                    InputLabelProps={{
                        shrink: true,
                    }}
                />
            </Box>
        </ThemeProvider>
      </ThemeContext.Provider>
  );
}

export default App;

ThemeUtil.js:

import React from "react";

import {createTheme} from '@mui/material/styles';

const darkTheme = createTheme({
    palette: {
        mode: "dark",
    },
    typography: {
        fontSize: 16,
    },
});

const lightTheme = createTheme({
    palette: {
        mode: "light",
    },
    typography: {
        fontSize: 16,
    },
});

const ThemeContext = React.createContext({
    theme: darkTheme, toggleTheme: () => {
    }
});

export default darkTheme;
export {lightTheme, ThemeContext};

How do I make the spin buttons appear dark, similar to the example on the Material UI site? Can the theme be modified to set those to a specified color?