ref Questions
8
Solved
If I did not get this terribly wrong, this behaviour is strange for me. Rather than explaining, I'll post a sample code below and please tell me why does I get output x and not y.
private void but...
Pouched asked 6/9, 2011 at 14:33
1
Solved
I am a little confused about using ref() in vue 3 (script setup) because of the ref().value.
what I want to know is should I use ref().value = ref().value or ref()=ref() I provide an example:
<s...
Perique asked 24/6, 2022 at 22:30
3
Solved
Vetur is underlining null on this line below:
const firstRef = ref<HTMLElement>(null)
No overload matches this call.
Overload 1 of 3, '(raw: HTMLElement): Ref', gave the following error.
...
Madison asked 21/7, 2020 at 20:37
5
Solved
How can I fetch from a ref cursor that is returned from a stored procedure (OUT variable) and print the resulting rows to STDOUT in SQL*PLUS?
ORACLE stored procedure:
PROCEDURE GetGrantListByPI(p...
Squamation asked 28/4, 2011 at 16:55
1
I'm using Vue3 with the composition API. In a form-component I put ref's on each field (child-component).
For some reason the ref's of the custom components are different from ref's for Quasar comp...
Ruffian asked 9/2, 2022 at 15:32
5
Getting the error in browser Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()
My code:
import { yupResolver } from '@hookform...
Airworthy asked 7/6, 2021 at 19:49
1
Solved
Cause I want to select the node element of component, so I think maybe I can use $refs.
Parent
<template>
<my-component ref="myComponentElement"></my-component>
</te...
Sangsanger asked 16/12, 2021 at 12:17
4
Solved
Imagine you have a aws resource such as
Resources:
IdentityPool:
Type: "AWS::Cognito::IdentityPool"
Properties:
IdentityPoolName: ${self:custom.appName}_${self:provider.stage}_identity
Cogni...
Lutyens asked 27/4, 2018 at 20:52
4
Solved
I'm mapping through an array and for each item display a button with text. Say I want that on clicking the button, the text underneath will change its color to red. How can I target the sibling of ...
2
Solved
I have a requirement to show thumbnails of videos(cards) in several rows and focus on the very first thumbnail. I did the display using Nested Map. The code basically iterates over a videos array a...
Dote asked 14/12, 2017 at 18:36
2
Solved
I am building a carousel right now, in React. To scroll to the individual slides I am using document.querySelector like so :
useEffect(() => {
document.querySelector(`#slide-${activeSlide}`).s...
Exhume asked 5/12, 2019 at 16:0
3
Solved
I've this question about pass some instances by ref or not: here is my problem:
Case 1: simple var like int:
private void button2_Click(object sender, EventArgs e)
{
int nTest = 10;
testInt(nT...
Yellows asked 27/6, 2012 at 7:4
8
Solved
I was trying to do this.
I must be missing something, but I don't understand why current is always null in this example.
class App extends React.PureComponent {
constructor(props) {
super(props...
Robichaud asked 5/8, 2018 at 9:33
3
Solved
I have two components in react native and I'm unable to close a modal from my child component.
ListTrips - Parent
ModalAddTrip - Child
ListTrips.js
import ModalAddTrip from './ModalAddTrip';
.....
Merell asked 23/11, 2018 at 16:1
4
Solved
I'm working on an agenda/calendar app with a variable time range. To display a line for the current time and show blocks for appointments that have been made, I need to calculate how many pixels co...
2
I'm currently receiving the following error in my React app:
Function components cannot be given refs. Attempts to access this ref
will fail. Did you mean to use React.forwardRef()?
How can I fix...
Aldenalder asked 16/3, 2021 at 22:18
2
I realize that this question has been asked several times already, but unfortunately none of the solutions under the older questions have been able to solve my issue. Essentially, I'm trying to pul...
3
In React Typescript with the exhaustive-deps rule enabled, when I define a ref and use that inside of an effect, the linter is fine with it:
const stringRef: RefObject<string> = useRef("...
Derma asked 10/2, 2021 at 11:44
1
I have a component for dialog windows in Vue 2 that is listening to event tcs-show-confirm (it is the same event that shows the dialog, sets the show property to true - in a parent component):
@P...
Reclusion asked 9/10, 2017 at 12:28
1
Solved
I'm still a bit new to Typescript and my goal is to create a custom React.useRef hook in Typescript that returns a ref. I would like this ref to be typed for any HTML element and not just buttons o...
Glarus asked 22/1, 2021 at 22:46
1
Solved
I have an input tag, when I press the escape key, I want the focus on the input element to go away, meaning there is no longer a text cursor or any focus styling(when the user types, their input wi...
Aciculate asked 15/1, 2021 at 16:38
2
I started to use swagger with swagger-ui-express and swagger-jsdoc to auto document my existing API, which is written with nodejs and express (like described here - example).
I came across a probl...
2
I am getting the following error but I am not able to figure out how to fix it someone can help me out.
Below is also the link on expo with the complete code.
Error on <AppIntroSlider /> whic...
Syrup asked 5/12, 2020 at 18:52
3
I want to use ref, however I am not able to use this in the conditional rendering which is initially false.
constructor(props) {
super(props);
this.state = {
filterActive: false,
}
this.firs...
Benjie asked 25/9, 2019 at 9:22
2
I have a ref:
const editItem = ref<object | null>(null)
Here's an example value for it:
{
id: 1,
title: 'Harry Potter',
author: 'J.K. Rowling',
created: '30-08-2000',
}
If I run console...
Warehouse asked 30/10, 2020 at 17:33
© 2022 - 2025 — McMap. All rights reserved.