-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(column-picker-mixin): get rid of ColumnPickerMixin and refactor …
…components which use it EMP-3960
- Loading branch information
1 parent
91c3350
commit 5c6d71d
Showing
15 changed files
with
423 additions
and
447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...es/_vue3-migration-test/src/components/column-picker/test-base-column-picker-dropdown.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<BaseColumnPickerDropdown v-model="selectedColumns" :columns="columns"> | ||
<template #toggle="{ item, isOpen }">Selected: {{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template> | ||
<template #item="{ item, isSelected, isHighlighted }"> | ||
<span v-if="isHighlighted">🟢</span> | ||
<span v-if="isSelected">✅</span> | ||
<span>{{ item }}</span> | ||
</template> | ||
</BaseColumnPickerDropdown> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
import BaseColumnPickerDropdown from '../../../../x-components/src/components/column-picker/base-column-picker-dropdown.vue'; | ||
const columns = ref([2, 4, 6]); | ||
const selectedColumns = ref(4); | ||
</script> |
27 changes: 27 additions & 0 deletions
27
packages/_vue3-migration-test/src/components/column-picker/test-base-column-picker-list.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<template> | ||
<!-- | ||
<BaseColumnPickerList v-model="selectedColumns" :columns="columns"> | ||
<template #default="{ column, isSelected }"> | ||
<span v-if="isSelected">✅</span> | ||
<span>{{ column }}</span> | ||
</template> | ||
<template #divider> | ||
<span>-----</span> | ||
</template> | ||
</BaseColumnPickerList> | ||
--> | ||
<span> | ||
BREAKING Vue3: `template v-for` key should be placed on the `template` tag (rather than on its | ||
children) | ||
</span> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
/* | ||
import { ref } from 'vue'; | ||
import BaseColumnPickerList from '../../../../x-components/src/components/column-picker/base-column-picker-list.vue'; | ||
const columns = ref([2, 4, 6]); | ||
const selectedColumns = ref(4); | ||
*/ | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from './animations'; | ||
export { default as TestBaseColumnPickerDropdown } from './column-picker/test-base-column-picker-dropdown.vue'; | ||
export { default as TestBaseColumnPickerList } from './column-picker/test-base-column-picker-list.vue'; | ||
export { default as TestBaseDropdown } from './test-base-dropdown.vue'; | ||
export { default as TestBaseEventButton } from './test-base-event-button.vue'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.