Page 1 of 1

[REACT] Cannot Add inputAttributes to BryntumWidget

Posted: Thu Jan 14, 2021 6:20 pm
by rwilson504

I am attempting to add additional attributes to the input control of Widgets in REACT utilizing the inputAttributes property. I am to set the property on the Widget but the attributes never appear on the input. I need to do this for multiple Widget types including Combo, Date, and Text fields which the documentation says should be possible. I also attempted this using a JS version and that seems to work fine, it appears it's just an issue in REACT.

2021-01-14 11_14_38-Header.tsx - filtering - Visual Studio Code.png
2021-01-14 11_14_38-Header.tsx - filtering - Visual Studio Code.png (64.53 KiB) Viewed 356 times
2021-01-14 11_15_52-Bryntum Scheduler - React + TypeScript filtering demo.png
2021-01-14 11_15_52-Bryntum Scheduler - React + TypeScript filtering demo.png (165.46 KiB) Viewed 356 times

Version : 4.0.7


Re: [REACT] Cannot Add inputAttributes to BryntumWidget

Posted: Fri Jan 15, 2021 10:56 am
by pmiklashevich

Hello,

Indeed, current version of the BryntumWidget react component doesn't support it. Please modify Scheduler/examples/react/_shared/src/lib/BryntumWidget.js and add 'inputAttributes' string to the supported configs.

    // this is only a subset of all possible widget properties of all types
    configs = [
        'inputAttributes',
        ....

Then rebuild the wrapper and the property should work. We're preparing a new version of the wrapper so soon it will pass all React component props as configs to the Bryntum widget. Stay tuned!

Cheers,
Pavel