Skip to content

Conversation

@vinicius73
Copy link
Contributor

@vinicius73 vinicius73 commented Aug 12, 2022

Related to #3021

  • add scoped default slot
  • expose clearFocusTrap
  • add example in Actions

<template>
  <div>
    <input ref="input" />
    <Actions>
      <template v-slot:default="{ clearFocusTrap }">
        <ActionButton @click="focusInput(clearFocusTrap)" :close-after-click="true">
          <template #icon>
            <Delete :size="20" />
          </template>
          Focus input
        </ActionButton>
        <ActionButton @click="actionDelete">
          <template #icon>
            <Delete :size="20" />
          </template>
          Delete
        </ActionButton>
      </template>
    </Actions>
  </div>
</template>

<script>
import Delete from 'vue-material-design-icons/Delete'
export default {
  components: {
    Delete,
  },
  methods: {
    actionDelete() {
      alert('Delete')
    },
    async focusInput(clearFocusTrap) {
      await clearFocusTrap({ returnFocus: false })
      await this.$nextTick()
      this.$refs.input.focus()
    },
  },
}
</script>

@vinicius73 vinicius73 added 3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities labels Aug 12, 2022
@vinicius73 vinicius73 force-pushed the feature/enhance-actions-focus-trap branch from ef473b0 to 9d188ea Compare August 12, 2022 20:17
@raimund-schluessler
Copy link
Contributor

Not sure why, but the docs don't build/work.

@raimund-schluessler
Copy link
Contributor

raimund-schluessler commented Aug 12, 2022

Not sure why, but the docs don't build/work.

Locally, the styleguide looks good (and the example works). Maybe just a hiccup?

@raimund-schluessler
Copy link
Contributor

@vinicius73 I hope you don't mind, I pushed a commit with my suggestions. If you disagree with them, just discard my commit. The docs still don't show up, though.

@vinicius73
Copy link
Contributor Author

vinicius73 commented Aug 12, 2022

@vinicius73 I hope you don't mind, I pushed a commit with my suggestions. If you disagree with them, just discard my commit. The docs still don't show up, though.

I disagree just about getActions, but as I said, I am preparing other PR. :)

@raimund-schluessler
Copy link
Contributor

@vinicius73 I hope you don't mind, I pushed a commit with my suggestions. If you disagree with them, just discard my commit. The docs still don't show up, though.

I disagree just about getActions, but as I said, I am preparing other PR. :)

Actions was just rewritten, I would like to know what you think needs to change. Let's see your PR😉

@raimund-schluessler raimund-schluessler added the 💥 breaking PR that requires a new major version label Aug 13, 2022
@raimund-schluessler raimund-schluessler added this to the 6.0.0 milestone Aug 13, 2022
@raimund-schluessler raimund-schluessler added discussion Need advices, opinions or ideas on this topic bug Something isn't working labels Aug 13, 2022
@raimund-schluessler raimund-schluessler added the feature: actions Related to the actions components label Aug 16, 2022
Vinicius Reis and others added 4 commits August 16, 2022 08:55
add scoped default slot and expose clearFocusTrap

Signed-off-by: Vinicius Reis <[email protected]>
Signed-off-by: Raimund Schlüßler <[email protected]>
Signed-off-by: Raimund Schlüßler <[email protected]>
Signed-off-by: Vinicius Reis <[email protected]>
@vinicius73 vinicius73 force-pushed the feature/enhance-actions-focus-trap branch 2 times, most recently from 51b00d4 to 5d8360b Compare August 16, 2022 12:06
@raimund-schluessler
Copy link
Contributor

Underlying issue was solved with #3030.

@raimund-schluessler raimund-schluessler deleted the feature/enhance-actions-focus-trap branch August 17, 2022 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities 💥 breaking PR that requires a new major version bug Something isn't working discussion Need advices, opinions or ideas on this topic feature: actions Related to the actions components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants