Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ganttBarConfig.style error: TypeError: Failed to set an indexed property [0] on 'CSSStyleDeclaration': Indexed property setter is not supported. #112

Open
Lnncoco opened this issue May 8, 2024 · 2 comments

Comments

@Lnncoco
Copy link

Lnncoco commented May 8, 2024

Following the official example, I added a style attribute in row1BarList.ganttBarConfig, but the browser reports an error: "TypeError: Failed to set an indexed property [0] on 'CSSStyleDeclaration': Indexed property setter is not supported."

https://zunnzunn.github.io/vue-ganttastic/getting-started.html

const row1BarList = ref([
  {
    myBeginDate: "2021-07-13 13:00",
    myEndDate: "2021-07-13 19:00",
    ganttBarConfig: {
      // each bar must have a nested ganttBarConfig object ...
      id: "unique-id-1", // ... and a unique "id" property
      label: "Lorem ipsum dolor",
      style: `background: red`
    }
  }
])

vue: 3.4.21
@infectoone/vue-ganttastic: 2.3.2

@Pedrocanoas
Copy link
Contributor

style props need to be a object with css declarations

style: {
  background: 'red',
  borderRadius: '5px'
}

@Lnncoco
Copy link
Author

Lnncoco commented May 9, 2024

Thank you. It's configured now.
A suggestion, the official website's API: GGanttRow section does not include a description of GanttBarObject[]. One needs to delve into the source code or navigate to the Common use cases section to find this information, which is not very convenient for searching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants