soramitsu / soramitsu-js-ui-library

Javascript UI library used by SORAMITSU
Apache License 2.0
8 stars 3 forks source link

Use generics #545

Open Ctepan opened 1 year ago

Ctepan commented 1 year ago

https://blog.vuejs.org/posts/vue-3-3#generic-components

For example, now STable for data prop has type Record<string, unknown>[], so row data passed with emit or slot-scope now has this type, instead of origin type of provided data.

VladislavPopovSR commented 5 months ago

Updating to 0.13.9+ version causes an error with InstanceType . Install vue-component-type-helpers and use ComponentExposed instead:

import type { ComponentExposed } from 'vue-component-type-helpers';

const table = ref<ComponentExposed<typeof STable> | null>(null);

Formatter property and similar are left to be implemented.