Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using InputNumber inside DataTable cell doesn't change v-model if you press Enter or Tab #547

Closed
zukka77 opened this issue Oct 12, 2020 · 5 comments

Comments

@zukka77
Copy link

zukka77 commented Oct 12, 2020

When you "cell-edit" an InputNumber and you press Enter or Tab, the cells switch to non-edit-mode, but value in the InputNumber reverts back to the old value:

<DataTable :value="values" :autoLayout="true" editMode="cell" class="editable-cells-table">
            <Column header="Code" field="code" />
            <Column header="Price" field="price"/>
            <Column header="Quantity" field="quantity">
            <template #editor="slotProps">           
                <InputNumber v-model="slotProps.data[slotProps.column.field]" :min="0"/>
            </template>
            </Column>
</DataTable>

It works if you change the value via arrows key or if you click outside the DataTable.
[email protected]
[email protected]

Alketta added a commit to Alketta/primevue that referenced this issue Oct 22, 2020
Backport changes from commit 7cf493d
Fix issue primefaces#547
@cagataycivici cagataycivici added this to the 3.0.2 milestone Oct 22, 2020
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 22, 2020
@mdartic
Copy link

mdartic commented Oct 23, 2020

Same for me, we use the [email protected], and encounter this bug.

The fix proposed in 1b109c3 solved the bug for us.

We use it as a patch for now.

@cagataycivici do you want we propose a PR for the 2.x branch ?

@mertsincan
Copy link
Member

Hi all,

I've made a few improvements with the InputNumber. I'll add them and the 'input' event support to the 2.x version.

Best Regards,

@mertsincan mertsincan modified the milestones: 3.0.2, 2.2.2 Nov 26, 2020
@mdartic
Copy link

mdartic commented Nov 26, 2020

@mertsincan maybe you already answer somewhere, but could you clarify what's the future of the 2.x branch ?

We love it, and we think to upgrade to the 3.x branch (and Vue 3 too), but we don't know when.

We encounter some bugs on the 2.x branch, and we have to tell you them (we have some fixs too, but not already pushed on github).

Could we still propose PRs for the 2.x branch ?

@cagataycivici
Copy link
Member

@mdartic We have an active 2.x branch, when a version for v3 gets released, a v2 counterpart will follow in a day or two. Feel free to create issues whether they apply to both v2-v3 or just one of them.

@mertsincan Let's discuss this one today as I'd like to release v2 by tomorrow.

@mertsincan
Copy link
Member

Hi,

Fixed with #705 and #676

Best Regards,

@mertsincan mertsincan removed this from the 2.2.2 milestone Nov 27, 2020
@mertsincan mertsincan removed the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 27, 2020
@mertsincan mertsincan removed their assignment Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants