Page 1 of 1

[VUE][TypeScript] GridConfig cannot be used as type for Grid configs in Vue

Posted: Sun Aug 07, 2022 2:48 pm
by pmiklashevich

Hello team! I cannot use GridConfig as a type because there is no stripeFeature in it. Since frameworks use nameFeature notation, it would be nice to have all features listed in the GridConfig typings. Same for scheduler and schedulerpro. Thanks!

Testcase:

import { GridConfig, ColumnConfig } from '@bryntum/schedulerpro'
import GroupStore from '@/components/bryntum/stores/GroupStore'

const columns: Partial<ColumnConfig>[] = [
  { text: 'Groups', field: 'title' },
]

const GroupGridConfig: Partial<GridConfig> = {
  store: GroupStore,
  rowHeight: 20,
  columns,
  // region Features
  stripeFeature: true,
  // endregion
}

export { GroupGridConfig }

Error:

Object literal may only specify known properties, and 'stripeFeature' does not exist in type 'Partial<GridConfig>'.
Screen Shot 2022-08-07 at 15.45.38.png
Screen Shot 2022-08-07 at 15.45.38.png (297.67 KiB) Viewed 278 times

P.S. I would recommend you to update your framework demos to start using types. That will help you to reveal such issues.


Re: [VUE][TypeScript] GridConfig cannot be used as type for Grid configs in Vue

Posted: Mon Aug 08, 2022 10:47 am
by alex.l

Hi Pavel,
Thanks for the report, here is a ticket https://github.com/bryntum/support/issues/5020