bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

BryntumTimeline feature prop binding not working #9056

Closed marciogurka closed 1 month ago

marciogurka commented 6 months ago

Forum post

"Hello,

we've noticed that right now it's not possible to use React feature prop binding with the BryntumTimeline component.

Code like this doesn't work as expected, the feature is not bound.

        <BryntumTimeline
            eventTooltipFeature={{
                template: function (data) {
                                        ....
                                 }
                        }}
                 />

I checked gantt-react\lib\BryntumTimeline.js and it's missing the "featureNames".

Manually adding it in our own code before using the BryntumTimeline component like so works and the prop feature binding is now working as expected:

BryntumTimeline.featureNames = ['eventTooltipFeature'];

"

SergeyMaltsev commented 1 month ago

Not reproducible in Bryntum suite 6.1.0 image

From wrapper source

   export type BryntumTimelineProps = {
...
 /**
     * Displays a tooltip when hovering events. The template used to render the tooltip can be customized, see [template](https://bryntum.com/products/gantt/docs/api/Scheduler/feature/EventTooltip#config-template).
     * Config options are also applied to the tooltip shown, see [Tooltip](https://bryntum.com/products/gantt/docs/api/Core/widget/Tooltip) for available options.
     * ...
     * [View online docs...](https://bryntum.com/products/gantt/docs/api/Scheduler/feature/EventTooltip)
     */
    eventTooltipFeature? : object|boolean|string|EventTooltip|EventTooltipConfig