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

fix (v-edit-dialog): restores save/open/close/cancel events #3227

Merged
merged 3 commits into from
Jun 11, 2018

Conversation

jacekkarczmarczyk
Copy link
Member

@jacekkarczmarczyk jacekkarczmarczyk commented Feb 8, 2018

Description

adds back VEditDialog events that were removed in 1.0

Motivation and Context

fixes #3197

How Has This Been Tested?

docs

Markup:

<template>
  <v-app id="app">
    <v-content>
      <v-data-table
        :headers="headers"
        :items="items"
      >
        <template slot="items" slot-scope="props">
          <td>
            <v-edit-dialog
              :return-value.sync="props.item.name"
              @save="save"
              @open="open"
              @close="close"
              @cancel="cancel"
              lazy
            > {{ props.item.name }}
              <v-text-field
                slot="input"
                label="Edit"
                v-model="props.item.name"
                single-line
                counter
              ></v-text-field>
            </v-edit-dialog>
          </td>
          <td class="text-xs-right">
            <v-edit-dialog
              :return-value.sync="props.item.iron"
              large
              lazy
              persistent
              @save="save"
              @open="open"
              @close="close"
              @cancel="cancel"
            >
              <div>{{ props.item.iron }}</div>
              <div slot="input" class="mt-3 title">Update Iron</div>
              <v-text-field
                slot="input"
                label="Edit"
                v-model="props.item.iron"
                single-line
                counter
                autofocus
              ></v-text-field>
            </v-edit-dialog>
          </td>
        </template>
        <template slot="pageText" slot-scope="{ pageStart, pageStop }">
          From {{ pageStart }} to {{ pageStop }}
        </template>
      </v-data-table>
    </v-content></v-app>
</template>

<script>
export default {
  data() {
    return {
      headers: [{
        text: "Dessert (100g serving)",
        align: "left",
        sortable: false,
        value: "name"
      }, { text: "Iron (%)", value: "iron" }],
      items: [{
        name: "Frozen Yogurt",
        iron: "1%"
      }]
    };
  },
  methods: {
    save: () => console.log('Value saved!'),
    open: () => console.log('Dialog opened'),
    close: () => console.log('Dialog closed'),
    cancel: () => console.log('Canceled')
  }
};
</script>

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes, dev for new features and breaking changes).
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have created a PR in the documentation with the necessary changes.

Docs

https://github.com/vuetifyjs/vuetifyjs.com/pull/269

@KaelWD KaelWD added P: critical The issue is of critical importance pending team review The issue is pending a full team review labels Feb 27, 2018
@KaelWD KaelWD added this to the Sprint 5 milestone Feb 27, 2018
@johnleider johnleider modified the milestones: Sprint 5, Sprint 6 Mar 6, 2018
@johnleider
Copy link
Member

Since we have to wait for v1.1 to implement this, maybe it's something we could look at to improve even more. I know you have expressed dislikes in the way we are currently handling this.

@johnleider johnleider added S: on hold The issue is on hold until further notice and removed P: critical The issue is of critical importance labels Mar 19, 2018
@jacekkarczmarczyk
Copy link
Member Author

I'm not a big fan of having another component that is de facto the v-dialog with some predefined props, some magic behind and limited possibility of customizing.
However removing v-edit-dialog sounds like a breaking change, so I think as long as v-edit-dialog is still there it's ok for 1.1 to add this fix

@KaelWD
Copy link
Member

KaelWD commented Mar 19, 2018

It's a menu though isn't it?

And yeah I'm cool with releasing this in 1.1 but also deprecating the component at the same time, with examples of how to implement it manually of course.

@KaelWD KaelWD modified the milestones: Sprint 6, Sprint 8 Mar 20, 2018
@KaelWD KaelWD removed this from the Sprint 8 milestone Mar 27, 2018
@jacekkarczmarczyk jacekkarczmarczyk added the S: has merge conflicts The pending Pull Request has merge conflicts label Jun 10, 2018
@codecov
Copy link

codecov bot commented Jun 11, 2018

Codecov Report

Merging #3227 into dev will decrease coverage by 0.14%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #3227      +/-   ##
==========================================
- Coverage   86.87%   86.73%   -0.15%     
==========================================
  Files         158      158              
  Lines        4199     4206       +7     
  Branches     1332     1332              
==========================================
  Hits         3648     3648              
- Misses        442      449       +7     
  Partials      109      109
Impacted Files Coverage Δ
src/components/VDataTable/VEditDialog.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2773c94...073f412. Read the comment docs.

@jacekkarczmarczyk jacekkarczmarczyk removed the S: has merge conflicts The pending Pull Request has merge conflicts label Jun 11, 2018
@jacekkarczmarczyk jacekkarczmarczyk changed the title fix (v-edit-dialog): restores **save** event fix (v-edit-dialog): restores **save**/**open**/**close** events Jun 11, 2018
@jacekkarczmarczyk jacekkarczmarczyk force-pushed the fix/3197-restore-v-edit-dialog-events branch from 19d7ecc to 073f412 Compare June 11, 2018 05:51
@jacekkarczmarczyk jacekkarczmarczyk changed the title fix (v-edit-dialog): restores **save**/**open**/**close** events fix (v-edit-dialog): restores save/open/close/cancel events Jun 11, 2018
@jacekkarczmarczyk jacekkarczmarczyk added this to the v1.1.x milestone Jun 11, 2018
@jacekkarczmarczyk jacekkarczmarczyk merged commit 2da917b into dev Jun 11, 2018
@jacekkarczmarczyk jacekkarczmarczyk deleted the fix/3197-restore-v-edit-dialog-events branch June 11, 2018 17:52
@jacekkarczmarczyk jacekkarczmarczyk removed S: on hold The issue is on hold until further notice pending team review The issue is pending a full team review labels Jun 11, 2018
@lock
Copy link

lock bot commented Apr 15, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants