Skip to main content

New answers tagged

0 votes

Angular local library component rendering error (reading 'bindingStartIndex')

adding "@angular/*": ["./node_modules/@angular/*"] to the paths of tsconfig.json did the trick. Not sure if I'd ever find it out on my own.
Andrew Ku's user avatar
0 votes

How do I change localhost:3000 to custom.domain in react

run below command to start the server HOST=admin.localhost && npm start server will start on the below url http://admin.localhost:3000/ you can replace admin.localhost with what you want
Umer Iqbal's user avatar
0 votes

Why when i send a fecth requst to Open Weather API in React JS. React first return me undefined an after that data?

When your component renders it makes an api call to obtain the weather, so untill your call successfully retrieves the weather data and sets it in the state, your weatherData is undefined. The ...
Angel Zlatanov's user avatar
1 vote
Accepted

Why when i send a fecth requst to Open Weather API in React JS. React first return me undefined an after that data?

No default value was specified for the state: const [weatherData, setWeatherData] = useState(); So it defaults to undefined. You could add any default you like. For example, this would default to ...
David's user avatar
  • 216k
0 votes

Angular local library component rendering error (reading 'bindingStartIndex')

This article really helped me solve this. I moved the lib folder inside the app folder. Them followed these steps. cd my-app npm install cd my-lib npm install npm run build cd ../ npm link my-lib npm ...
Naren Murali's user avatar
  • 41.6k
0 votes

How to show component only when loaded in react?

Here's one way you can do it. You can directly add a state to capture the data that you are fetching. You can then use that if it already has a value. Here's the updated code. function App() { const ...
ericute's user avatar
  • 194
0 votes

Maya animation in web application

To visualize Maya scenes on the web you need to use the WebGL technology. There are several toolkits that can be of help: Verge3D - integrates with Maya allowing simple one-click exports, but costs ...
Alexander's user avatar
1 vote
Accepted

AngularJS angular-xeditable stop cancel event

I solved this problem like this app.run([ 'editableOptions', function (editableOptions) { 'use strict'; editableOptions.blurElem = 'ignore'; }, ]);
DzmitryMashuk's user avatar
0 votes

Pdf is available in console but unable to see network tab

To make PDF available in the network tab you need to format it properly in multipart/form-data Modify the uploadPdfApi function to use FormData: export const uploadPdfApi = async (payload: ...
Temidayo's user avatar
0 votes

Vuetify2 styles not working properly with Django

Which package did you install? If you have installed material-design-icons-iconfont You should add below styles in main.js: import 'material-design-icons-iconfont/dist/material-design-icons.css'; If ...
huan feng's user avatar
  • 8,063
0 votes

How to add Prometheus to next.js?

Here is an example for NextJS version 14 /src/app/api/metrics/route.ts import client from "prom-client"; const collectDefaultMetrics = client.collectDefaultMetrics; const Registry = ...
vinboxx's user avatar
  • 665
0 votes

How to align <div> containers based on border position and midline?

You could use CSS grid - the number of columns being the number of rounds + 1 and the number of rows being (number of rounds) * (number of rounds). For a general solution I imagine you will want to ...
A Haworth's user avatar
  • 34.6k
-1 votes

How to add .env variables in vite.config.ts to use proxy server in React Typescript project?

I was looking around with similar a issue, and found this guy, that says he moved the file vite-env.d.ts from root dir to src. I did the same and worked; His post: react-vite-enviornment-variables-...
AkaFelski's user avatar
2 votes

How to align <div> containers based on border position and midline?

I come up with something like this! Hope this helps. It will auto adjust depending on the items in columns. I also added placeholders where the team names probably will be .team-name { ...
Tomáš Kováčik's user avatar
-2 votes

How to align <div> containers based on border position and midline?

you can use postion top right left etc and margin also to align divs where u want
SALMAN GRAPHIX DEV's user avatar
1 vote

PrimeNG, InputOtp cant change values of already filled input

You can overwrite the inputs with templates there you should then be able to access keydown and overwrite the value
Sven Heidemann's user avatar
0 votes

How to make animation , where characters starts to be colorful when hover it

Since you're using a black and white svg, I'd suggest using mask-image to accomplish this. This method allows you to flexibly change the object to any color you want: <article class="group/...
Karson Jo's user avatar
  • 865
0 votes

How do I get input values of a modal form from another file/module function?

Accessing form data User values entered into form elements are held as property values of the form element in the DOM. They are unrelated to the code location or file or module that created the form ...
traktor's user avatar
  • 18.7k
0 votes

How to pass the parameter in InertiaJS?

To the future developers, Now its more convenient. route('blogs.update', { post: blog.id }) Please change route name and parameters if required
Momen's user avatar
  • 1
0 votes

NextJS 12 version Route Issue

Could you remove the tag inside the Link? It would be best if you did not use an a tag inside the Link component as it can cause issues with client-side navigation. Instead, use the passHref prop on ...
Aakash Pal's user avatar
0 votes

How can I fix this Cannot find module 'ajv/dist/compile/codegen' Require stack: Error when I start my react app?

you can check package-lock.json and try re-install your node module again rm -rf node_modules package-lock.json npm install I hope this can help you or you can try this one Thanks! for this npm ls ...
Watthachai Taechalue's user avatar
0 votes

How to extend styles of a reusable button component in Astro using class props

I've updated my answer added an example of your code working. I would suggest that you add a default class with CSS as you already did and use a variant or other prop to change the CSS styling. ...
Guus's user avatar
  • 121
-1 votes

Url is changing but page is only appearing after reloading

This issue is because of the strict mode you can follow below steps for fixing it: Update your react-router-dom to [email protected]. Now remove <React.StrictMode> from index file. Your ...
Zealous System's user avatar
-1 votes

Url is changing but page is only appearing after reloading

If you are using the history package for navigation and are encountering issues with React Router v5, it might be due to compatibility problems with the history package version. Specifically, if the ...
fadzrinmadu's user avatar
1 vote
Accepted

corner button disappears on scrollable pages

You should move the .star-button out of the .sidebar, to be the direct child of .wrapper, because the .sidebar's overflow is cutting its visibility, like so: <div class="wrapper"> &...
iorgu's user avatar
  • 1,903
1 vote

Why do children of tailwind grid divs inherit their siblings' classes, such as padding and margin?

It's not inheriting the p-4 of the first item per se. You can see that by making the second element p-8 for example. Note all the elements would stretch to fill the height of the tallest element in ...
Sheikh Ameen's user avatar
0 votes

React state update and useEffect not behaving as expected in Next.js application

Can you provide more info? Where "index" came from and when it change? HandleLockClick can be semplyfied like that: const handleLockClick = () => { const newValue = !isLocked ...
Marco Rovida's user avatar
1 vote
Accepted

Trouble implementing Role-Based Access Control (RBAC) using cookies in React

When correctly logged In the backend Still doesn't receive said cookie. Possible reasons: 1. You have no cookie parser in your express server. You can use cookie-parser npm package and add it to your ...
kal_stackO's user avatar
0 votes

how to pass data between components mudblazor(or blazor)

Similar to option, you can pass parameters when you show the MudDialog private Task OpenDialog(MouseEventArgs e) { var options = new DialogOptions { CloseOnEscapeKey = true }; var parameters = ...
eeemanueeeleee's user avatar
0 votes

How to avoid outer border and modify outer layout of Form using @rjsf/core

The outer boundary because of fieldSet of form so we can wrap the Form with a wrapper having required/expected styling
Taiyab's user avatar
  • 1
1 vote
Accepted

Electric Clojure - how to add new values into table? (as table format)

(e/defn TableApp [] (e/client (let [*userNamePlaceHolder (atom "Please write your username...") userNamePlaceHolder (e/watch *userNamePlaceHolder)] (dom/input (dom/...
Jace's user avatar
  • 26
2 votes

React component state not being correctly set

I removed useEffect. My code is now: if (active.id && !inputsData) { http.get(`/stock/${title}/${active.id}`).then((response) => { setInputsData(response....
DoINeedANameTho's user avatar
0 votes

React component state not being correctly set

useState hook is asynchronous , so sometimes you will see old state data. for getting new data we can rewrite code like this setInputsData((oldState) => {...oldState, ...response.data} );
SHRIDHAR's user avatar
0 votes

React component state not being correctly set

you are probably having a race condition where here is what happens: 1- you have the current state 2- you make a change that triggers the useEffect but with the old data (changing that refresh state ...
ṽïηøṧ's user avatar
1 vote

Is there a better way to retrieve frontend users from a database in vue.js

setup function is not a property of methods, setup function in this case is not necessary, move users function into methods. then const users = await users() in nextUser(), since there is an await ...
GLPease's user avatar
  • 580
0 votes

I have problem with selection of language it has option of writing

<Select defaultValue={options.find(option => option.value === currentLocale)} onChange={handleChange} options={options} styles={customStyles} isSearchable=...
Shelkonty's user avatar
0 votes
Accepted

How Can I Delete Written Number, Python Code?

The problem is with the validate functions of these three entries, you are using this expression for all value.isdigit() and len(value) <= 5 Now when you press the clear button, the key that ...
Sharim09's user avatar
  • 6,196
0 votes
Accepted

How to bind vee-validate field to Vuetify's v-autocomplete without showing [object Object]?

The field slot prop contains a value property, which through v-bind ends up on the input. Remove it from the slot props to get rid of the issue: <Field v-slot="{field: {value, ......
Moritz Ringler's user avatar
0 votes

get current Material UI breakpoint name

Might be too late here, however this is what I use for such purposes: const useBreakpoint = (): Breakpoint => { const theme = useTheme(); const breakpoints = ['xs', 'sm', 'md', 'lg', 'xl'] as ...
The Reason's user avatar
  • 7,893
0 votes

Nav Bar Not Showing

There are several problems with your code, some of which are stylistic. Issue 1: Missing Route for /admin One main problem is that you have a link to /admin, but you don't have a route for /admin. ...
brff19's user avatar
  • 824
0 votes

Can I add a default script line to package.json

On newer versions > 8 a new syntax was introduced to manage the package.json file npm pkg set scripts.start="live-server --browser=firefox" this will create a new script "scripts&...
FDisk's user avatar
  • 9,180
-1 votes

What is the best way to run a function after the DOM has loaded or view is rendered?

you can use angular ChangeDetectorRef https://v17.angular.io/api/core/ChangeDetectorRef
Sourav Raj's user avatar
0 votes

What is the best way to run a function after the DOM has loaded or view is rendered?

You should use [ngClass] which can be used to add classes conditionally. Also prefer angular directives instead of JS or JQuery, do go through angular.dev for reference. <button id='sms' [ngClass]=&...
Naren Murali's user avatar
  • 41.6k
0 votes

What is the best way to run a function after the DOM has loaded or view is rendered?

import { HostListener } from '@angular/core'; let contactMethod: string = 'sms'; @HostListener('window:load') onLoad() { this.highlightSelectedMethod(this.contactMethod); } ngAfterViewInit runs ...
Gage's user avatar
  • 99
0 votes

How can I change my buttons shape in carousel from lines in round

I think you can control this by changing the spans inside the prev and next buttons... for example. If you want to use icons instead Remove class="carousel-control-next" and "carousel-...
Esraa Mohamed's user avatar
0 votes

How to render the dynamic angular code which is stored in a string type variable

You can render a html string in Angular using the below code. <div [innerHTML]="htmlString"></div> You need to ensure you are rendering only hard-coded strings inside this, ...
Naren Murali's user avatar
  • 41.6k
0 votes

Apple Login with Next_Auth : error=OAuthCallback

I think you should use "redirect=false" in the signIn logic then you can console log res.error to understand the error you are facing. Redirect = false will prevent your app from redirecting ...
Barnabas's user avatar
0 votes
Accepted

fetching JSON breaks website and doesn't display content properly

The issue was that I had a scroll-hidden class setup, which set the opacity to 0. I also had a script, which has an intersection observer that is checking if the element is visible and if so, it ...
Vojta Fluger's user avatar
0 votes

How to make layout like facebook ? Using html css (flexbox)

it works using grid and i set the position of its container to relative which is the container for the left middle and right div. the left and right div has a defined height and position sticky to ...
Shashimii's user avatar

Top 50 recent answers are included