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

Prevent group edited indicator in Shared View #11284

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

azrikahar
Copy link
Contributor

Bug

Currently groups in the Shared View shows the dot beside their label, but it shouldn't be the case as it's a read-only view:

(Detail group will only show the dot when it's closed, hence it's not shown here)

chrome_CzxRjgX0Ze

Investigation

This happens because shared view is passing the item into v-model as well:

<v-form
v-model="item"
:collection="collection"
:initial-values="item"
:primary-key="primaryKey"
disabled
:loading="loading"
/>

Whereas as shown in collection items, edits should be the one passed to v-model:

<v-form
ref="form"
:key="collection"
v-model="edits"
:autofocus="isNew"
:disabled="isNew ? false : updateAllowed === false"
:loading="loading"
:initial-values="item"
:fields="fields"
:primary-key="internalPrimaryKey"
:validation-errors="validationErrors"
/>

Solution

Initially removed the v-model flat out, but later on opted to use edits like the existing form in collection items in case editing shared item became possible in the future.

chrome_qJ7Jn7DYEJ

@rijkvanzanten rijkvanzanten added this to the v9-next milestone Jan 26, 2022
@rijkvanzanten rijkvanzanten merged commit 2b7f2d1 into main Jan 26, 2022
@rijkvanzanten rijkvanzanten deleted the fix/group-edit-indicator-in-shared-view branch January 26, 2022 02:59
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants