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

Feature Request: Implement a builder pattern to simplify the creation of tables with hidden fields. #20

Open
rahl0b10 opened this Issue Dec 19, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@rahl0b10

rahl0b10 commented Dec 19, 2017

I believe a builder pattern would make the process of table creation, and hiding fields, relatively seamless. I've implemented a working version as follows:

var table = TableBuilder<DemoAnimals>
                .Initialize(animalData)
                .HideColumn("Name")
                .HideColumn("Color")
                .Build();

If this is a feature that is would be considered beneficial, I am happy to put in the pull request.

@tdwright

This comment has been minimized.

Show comment
Hide comment
@tdwright

tdwright Dec 19, 2017

Owner

I'd be keen to see more. It looks like a nice approach.

Quick question: does Build() return a string? Or a table object?

I'm also interested in you addressing the columns by their names. This is a feature I've been meaning to add anyway. Currently they have to be referenced by their index, which is not ideal.

Owner

tdwright commented Dec 19, 2017

I'd be keen to see more. It looks like a nice approach.

Quick question: does Build() return a string? Or a table object?

I'm also interested in you addressing the columns by their names. This is a feature I've been meaning to add anyway. Currently they have to be referenced by their index, which is not ideal.

@rahl0b10

This comment has been minimized.

Show comment
Hide comment
@rahl0b10

rahl0b10 Dec 20, 2017

The Build() method returns a Table<T> object.

If you'd like to see the (working but not refined) implementation, I just pushed to my account.

rahl0b10 commented Dec 20, 2017

The Build() method returns a Table<T> object.

If you'd like to see the (working but not refined) implementation, I just pushed to my account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment