Skip to content

Commit f05b3b6

Browse files
committed
Fix; missing import & docs
1 parent b9189b4 commit f05b3b6

File tree

5 files changed

+23
-7
lines changed

5 files changed

+23
-7
lines changed

src/components/DataTable/README.stories.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ export const Template = (args) => ({
104104
{ url: 'https://google.com', key: 'navy', content: 'Navy Merino Wool Blazer with khaki chinos and yellow belt'},
105105
'$445.00', 124518, 32, '$14,240.00',
106106
],
107+
[
108+
{ url: 'https://google.com', key: 'mauve', content: 'Mauve Cashmere Scarf'},
109+
'$230.00', 124533, 83, '$19,090.00',
110+
],
111+
[
112+
{ url: 'https://google.com', key: 'navy', content: 'Navy Merino Wool Blazer with khaki chinos and yellow belt'},
113+
'$445.00', 124518, 32, '$14,240.00',
114+
],
107115
];
108116
const sortedRows = ref(null);
109117
const rows = computed(() => {
@@ -156,7 +164,8 @@ Data tables are used to organize and display all information from a data set. Wh
156164
<Canvas>
157165
<Story
158166
name="Data table"
159-
height="350px"
167+
height="300px"
168+
inline={false}
160169
args={{
161170
totalsName: { singular: 'Total net sales', plural: 'Total net sales' },
162171
columnContentTypes: [

src/components/DataTable/components/Cell/Cell.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ template(v-else)
5959
</template>
6060

6161
<script setup lang="ts">
62-
import { ref, computed, useSlots } from 'vue';
62+
import { computed, useSlots } from 'vue';
6363
import { classNames, variationName } from 'polaris/polaris-react/src/utilities/css';
6464
import { headerCell } from 'polaris/polaris-react/src/components/shared';
6565
import SortAscendingMajor from '@icons/SortAscendingMajor.svg';
6666
import SortDescendingMajor from '@icons/SortDescendingMajor.svg';
67-
import { Icon, Tooltip } from '@/components';
67+
import { Icon, TruncatedText } from '@/components';
6868
import { UseI18n } from '@/use';
6969
import styles from '@/classes/DataTable.json';
7070
import type { SortDirection, VerticalAlign } from '../../types';

src/components/ResourceList/README.stories.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,11 @@ export const Template = (args) => ({
415415
latestOrderUrl: 'orders/1457',
416416
},
417417
];
418+
const sortValue = ref('DATE_MODIFIED_DESC');
418419
const onSortChange = (value) => {
419420
sortValue.value = value;
420421
};
421-
return { args, items, onSortChange };
422+
return { args, items, sortValue, onSortChange };
422423
},
423424
template: `
424425
<Card>

src/components/TextField/TextField.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ const verticalContentSlot = computed(() => slots.verticalContent?.());
325325
const height = ref<number>();
326326
const focus = ref<boolean>();
327327
const buttonPressTimer = ref<number>();
328-
const spinnerRef = ref<HTMLDivElement | null>(null);
328+
const spinnerRef = ref<InstanceType<typeof TextFieldSpinner> | null>(null);
329329
330330
watch(
331331
() => props.focused,
@@ -639,7 +639,7 @@ function isSpinner(target: Element | EventTarget) {
639639
return (
640640
target instanceof Element &&
641641
spinnerRef.value &&
642-
spinnerRef.value.contains(target)
642+
spinnerRef.value.el?.contains(target)
643643
);
644644
}
645645
</script>

src/components/TextField/components/Spinner/Spinner.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template lang="pug">
22
div(
3+
ref="elRef",
34
:aria-hidden="true",
45
:class="styles.Spinner",
56
@click="handleClick",
@@ -30,7 +31,8 @@ div(
3031
import CaretDownMinor from '@icons/CaretDownMinor.svg';
3132
import CaretUpMinor from '@icons/CaretUpMinor.svg';
3233
import styles from '@/classes/TextField.json';
33-
import { Icon } from '../../../Icon';
34+
import { Icon } from '@/components';
35+
import { ref } from 'vue';
3436
3537
const emits = defineEmits<{
3638
(event: 'click', e: Event): void
@@ -39,11 +41,15 @@ const emits = defineEmits<{
3941
(event: 'mousedown'): void
4042
}>();
4143
44+
const elRef = ref<HTMLDivElement | null>(null);
45+
4246
const handleClick = (e: Event) => {
4347
emits('click', e);
4448
}
4549
4650
const handleStep = (event: Event, step: number): void => {
4751
emits('change', step);
4852
};
53+
54+
defineExpose({ el: elRef })
4955
</script>

0 commit comments

Comments
 (0)