Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Follow up on custom data accessor #418 #508

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

Open
jfremy wants to merge 2 commits into AllenFang:master
base: master
Choose a base branch
Loading
from jfremy:pr-418

Conversation

Copy link
Contributor

@jfremy jfremy commented Jun 15, 2016

Hi,
I've taken #418 by @jdeniau and updated it to work on the latest master.
I've also updated the code so that search works with the custom data accessor and updated the example to show that.

That leave editing but I'm not sure you'd want to mix the 2. Let me know what you think

welcoMattic reacted with thumbs up emoji
jdeniau and others added 2 commits June 14, 2016 17:18
rebased the code on latest master
added support for search
updated example to show filtering and search
Copy link
Owner

@jfremy, thanks your contribution, I'll review it in later. Anyway, I want to fix this both issues but actually, I hope to have a better solution to cover all the condition for nest data. I've some plans but just no time to do...

Copy link

@jfremy Hi! Will you fix your PR or can I handle it? This feature looks like very important for usability of the component, may be we should fix it to publish a new release? cc @AllenFang

Copy link
Owner

Actually, It's hard to finish this job, because there're too many place which access the data field, so these place you need to consider how to apply the nest data structure on that.

I've a idea at before, but no time to make it to true...

Following is my plan,

Keep in mind, we should try to avoid touch the source code too many, maybe we can provide a meta transfer which responsibility is flat the nested data then we just give the flatten data into <BootstrapTable>

for example, the nested data is

[
{ id: 0, person: { name: 'Allen', age: 27 }, city: { address: 'xxx', region: 'ooo' } },
.....
]

We should transfer out the following result by this nested data according the user spec via our meta transfer

[
{ id: 0, name: 'Allen', age: 27, address: 'xxx', region: 'ooo' }
.....
]

But there's something we need to care, like TableDataStore.js and some exposed API, if anyone got interesting, feel free to connect me, maybe this is a better way to follow :)

Thanks :)

Siyfion reacted with thumbs down emoji Siyfion reacted with confused emoji

Copy link

Siyfion commented Mar 17, 2017

Not sure I agree with your idea there @AllenFang, for example what if the nested data looked like:

[
 { id: 0, person: { name: 'Allen', age: 27 }, spouse: { name: 'Tina', age: 24 } },
 ...
]

or similar?

Surely the sensible way is to change the code to use something like _.get() and _.set() from lodash?

JcBernack reacted with thumbs up emoji

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

Reviewers

1 more reviewer

@Mithun-UA Mithun-UA Mithun-UA approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /