New answers tagged frontend
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.
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
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 ...
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 ...
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 ...
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 ...
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 ...
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';
},
]);
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: ...
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 ...
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 = ...
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 ...
-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-...
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 {
...
-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
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
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/...
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 ...
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
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 ...
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 ...
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. ...
-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 ...
-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 ...
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">
&...
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 ...
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
...
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 ...
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 = ...
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
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/...
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....
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} );
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 ...
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 ...
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=...
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 ...
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, ......
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 ...
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. ...
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&...
-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
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]=&...
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 ...
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-...
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, ...
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 ...
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 ...
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 ...
Top 50 recent answers are included
Related Tags
frontend × 15274javascript × 6914
html × 3836
reactjs × 3798
css × 3472
angular × 1271
jquery × 1029
backend × 914
typescript × 795
vue.js × 772
web × 650
node.js × 607
web-frontend × 420
angularjs × 393
user-interface × 368
next.js × 313
react-hooks × 303
php × 298
material-ui × 271
python × 262
react-native × 258
twitter-bootstrap × 255
bootstrap-4 × 233
wordpress × 224
django × 209