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

Adding component to the footer element #25

Closed
Keyframe opened this issue Nov 18, 2018 · 4 comments
Closed

Adding component to the footer element #25

Keyframe opened this issue Nov 18, 2018 · 4 comments

Comments

@Keyframe
Copy link

Hi, this is more of a question than an issue.

Any idea how one could add a component to the footerElement?

I want to do add this component to the footerElement:

<DefaultButton
            data-automation-id="test"
            allowDisabledFocus={true}
            disabled={disabled}
            checked={checked}
            text="Button"
            onClick={this._alertClicked}
          />
@ngduc
Copy link
Owner

ngduc commented Nov 21, 2018

@Keyframe I've just added support for footerElement (JSX) in 0.7.9. Example:

<ReactTabulator
          columns={editableColumns}
          data={data}
          footerElement={<YourFooterComponent />}
/>

Demo - https://codesandbox.io/s/0mwpy612xw
Let me know if that works :]

@Keyframe
Copy link
Author

@ngduc sounds great, but I'm on use-tabulator-4.1.1 branch. If you can propagate that change to it, I can test it locally as well! :)

@ngduc
Copy link
Owner

ngduc commented Nov 23, 2018

I think I merged that branch to master & released it. can you try the latest 0.7.9? @Keyframe

@Keyframe
Copy link
Author

It does seem to work, except how do we pass arguments to props when nested within braces now? For example, those {true}, {disabled}, {checked}, {this._alertClicked} aren't passed

                    footerElement = {
                        <DefaultButton
                            data-automation-id="test"
                            allowDisabledFocus={true}
                            disabled={disabled}
                            checked={checked}
                            text="Button"
                            onClick={this._alertClicked}
                        />
                    }

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