Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 3, 2018. It is now read-only.
This repository was archived by the owner on May 3, 2018. It is now read-only.

Fetch the value of element dynamically #1328

Copy link
Copy link
Open
@mihirpatelipsos

Description

@mihirpatelipsos
Issue body actions

Hello,

I'm not sure if this is the question directly relate to Vue or JavaScript, but as it involves 'refs' from VueJs, i have posted question here.

I've multiple input text elements in my DOM. They are named as txtScore1, txtScore2, txtScore3 etc. On my click button event I want to fetch the value from say txtScore1. But how can I pass this refernce dynamically in this.$refs.{{ #some way of referring txtScore1 dynamically# }}.value?

I'm creating input element as follows:
<input v-bind:ref="'txtScore' + props.item.Id" type="text"/>

can you please help?

Thanks,
Mihir

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.