Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [ref]

The ref keyword causes an argument to be passed by reference, not by value. The effect of passing by reference is that any change to the parameter in the method is reflected in the underlying argument variable in the calling method. The value of a reference parameter is always the same as the value of the underlying argument variable.

ref
0 votes
0 answers
34 views

$refs undefined when accessing VueTelInput component

I am working on a Vue.js component that uses the VueTelInput component for phone number input. I am encountering an issue where this.$refs.creationPhoneInput is undefined: <template> <...
José Tomás Meyer's user avatar
0 votes
0 answers
21 views

How to disable next button of the vue-form-wizard? or override it with custom button and hide only the next button

I am new to vue js, I am using this vue-form-wizard and I am not sure if there is a way to disable the next button by some conditions, so depends on the conditions will enable or disable the button &...
Rooh Al-mahaba's user avatar
0 votes
1 answer
39 views

Are there any issues/concerns with assigning computed values to a ref property in Vue?

I'm reviewing some Vue code where the developer has assigned a computed value to a ref property. I've never seen this done before, and although it works, it seems odd to me. Are there any potential ...
Josh's user avatar
  • 911
0 votes
0 answers
33 views

Expression produces a union type that is too complex to represent.ts

I am creating a react component that creates a custom html element and sets innerhtml using dangerouslySetInnerHTML, everything goes fine but the issue arises when I provide the dynamic type to the ...
Dhiraj sah's user avatar
2 votes
0 answers
54 views

querySelector does not work as expected in Vue components

I'm new to vue.js and I've encountered a problem that I can't fix. In my SelectField.vue component I have written the following method: getModalBodyElement() { return document.querySelector('....
michael.brilz's user avatar
0 votes
1 answer
38 views

How do I fix this TypeScript error in the ref Next.js

This ref is returning a typeScript error and I don't know how to fix it. the code works on local enviroment but is getting the error in the deploy process const [quill, setQuill] = useState<any>(...
João Victor's user avatar
0 votes
0 answers
44 views

Joi Validation Schema - How to allow a set of values with Joi.valid but disallow one of them dinamically with Joi.invalid at the same time?

The problem is I need to do these validations at the same time: Validate that field 'b' is in an array of valid values Validate if the field 'b' has not the same value of 'a' I tried these 2 ...
YNA's user avatar
  • 1
0 votes
1 answer
51 views

How Vue3 @/v-on event function passing work?

<input type="file" id="fieldBoxContentAddPhoto" accept="image/png" @input="inputPhoto(this,fieldBoxContentAddPhoto2,fieldBoxContentAddPhoto3)" > <...
MGJH's user avatar
  • 11
1 vote
2 answers
71 views

Difference Between useMemo and useEffect With Ref Dependencies

In React, both useEffect and useMemo have a dependencies argument. I naively thought they worked identically: whenever the values in that dependencies argument changed, I thought the useEffect or ...
machineghost's user avatar
  • 35.2k
0 votes
0 answers
9 views

Nested OAS 3.0 $refs results in Incorrect type. Expected "object". Error

Example of SwaggerHub for VS Code by Smartbear, error It seems logical to want to do this...I have all of the "vehicle" attribute schemas declared as the appropriate types above. I want to ...
Michael Patrick Daugherty's user avatar
0 votes
1 answer
43 views

why ref does not get value in conditional rendering

i have a component which renders conditionally and i pass a ref to it via forwardRef of React ,but when condition met and component renders, the ref still has not any value, what should i do? here is ...
Faraz's user avatar
  • 89
1 vote
1 answer
43 views

Cannot read properties of null/undefined when fetching deep nested objects

I'm currently fetching an object from an api to my vue frontend. This object has many properties, even deep nested ones. For example a project object: { id: 1, title: "My Project", ...
Play4Fun2310's user avatar
0 votes
1 answer
89 views

Function components cannot be given refs. MUI v5 Autocomplete

i'm trying to use custom component for ListboxComponent prop in Autocomplete MUI v5, but i'm getting this error: Function components cannot be given refs. Attempts to access this ref will fail. Did ...
Hadji Andrei's user avatar
0 votes
0 answers
14 views

ReactJs-using ref to update input text field to blank after submit not working,input field not getting cleared

I'm trying to clear the input text field after the submit using ref,but it is not working.I don't want re-renders using taskRef.current/onChange and without it I can't use value atrribute as it ...
Ishita Trivedi's user avatar
1 vote
1 answer
56 views

Rust Arc pointer comparison fails despite same memory address

In Rust, I'm trying to make a group of objects that can be related to one another in a sort of target/dependency chain. I figured I could use a trait and, for each object, assign a "target" ...
RodoGM's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
95