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

Embedding a subtable in each row #519

Closed
OhioGuy67 opened this issue Oct 5, 2015 · 4 comments
Closed

Embedding a subtable in each row #519

OhioGuy67 opened this issue Oct 5, 2015 · 4 comments

Comments

@OhioGuy67
Copy link

I have a table setup in the following format

table id="myTable" st-table="myTable ...
tr
thHeader 1/th
thHeader 2/th
/tr
tr ng-repeat="item in myTable"
td{{item.data1}}/td
td{{item.data2}}/td
/tr
/table

So the table gets displayed like this:

Header1 Header2
Value11 Value12
Value21 Value22

What I want to do is embed a second table in each row that displays the values under the current values (these new values are already fields in myTable) so the table looks like this:

Header1 Header2
Value11 Value12
Subvalue 11 Subvalue12 Subvalue13
Subvalue 21 Subvalue22 Subvalue23
Subvalue 31 Subvalue32 Subvalue33
Value21 Value22

The subtable doesn't need any headers, doesn't need sorting, etc., just display the field values. How would I go about doing this?

Also, since I'm using bootstrap that defines the column widths, is the data in the subtable going to have to conform to the original table's columns (so in my example since the subtable has 3 columns and the original table only has 2, the original table will be expanded to 3 columns)?

Thanks for the assistance.

@OhioGuy67
Copy link
Author

So I'm wondering why my question was given this label. What guidelines doesn't it follow?

@lorenzofox3
Copy link
Owner

ok.
quoting the "submit an issue" section of the read me:

search in the already existing issues or on stackoverflow if your issue has not been raised before.

This one I can't tell.

give a precise description mentioning angular version, smart-table version.

What is your issue ? How is it related with smart-table ? For me you are more asking other people to do you job. If you try just a little bit you'll realise what you want to do is more related to basic HTML table layout and not to smart-table or even angular.
-angular version: missing
-smart-table: missing

give a way to reproduce your issue, the best would be with a running example, you can use plunkr smart-table is the list of available packages). Note if you want to mimic ajax loading behaviour you can use $timeout angular service or $httpBackend.

Nothing here, not even a code snippet. Have you tried anything ? You are only talking about what you want to do.

isolate your code sample on the probable issue to avoid pollution and noise.

Again, this goes back to: "how is smart-table involved in your problem ?". Answer: not at all

Close your issue when a solution has been found (and share it with the community)

We will see :)

Now let's go back to the 5 other issues you had already opened

  1. Sort icons not appearing #306 -> duplicate: you failed at searching. I closed the issue, not you
  2. Can left/right page arrows be displayed? #325 -> duplicate again, no snippet/plunker, I closed the issue, you did not even take the time to answer the SydneySmith comment.
  3. Getting number of items in table in pagination template #327 -> duplicate again, no snippet/plunker, I closed the issue
  4. Matching only first part of value when filtering on a field #396 -> no snippet/plunker, I closed the issue
  5. Backspacing in search text box doesn't work in IE #410 -> no search, no snippet/plunker, I closed the issue.

So to sum up, I have been working at least more than 1hour (on my free time mostly) for you on "problems" which are not related to smart-table issue but more to your lack of effort. This have not brought anything back to the community. So now please try to realise that people behind open source projects are also developers with their own stuff to handle, their time is as valuable as yours and think twice before opening a ticket:

"Have I done all what I could do ?" -> research, try etc
"How can I do to help the developer which will have to work on my ticket ?" snippet/plunker, issue details, etc
"How can I help back the community?" Is my solution resolved ? have I closed it ? How can I help if anyone encounter the same problem

If you want, I can provide you my paypal account so you can pay me the consulting work I have done for you ;)

@lorenzofox3
Copy link
Owner

in comparison here is a ticket I open in another project. Do you see the difference ?

@OhioGuy67
Copy link
Author

For the record, I have a couple of things I want to clear up. Yes, I haven't closed previous issues which is my fault.

I haven't put in version number either, but I've seen quite a few posts from others that don't either. So I'm not the only one guilty of that.

I do google search (which results in entries in stackoverflow links) before I ask the question. I don't always search the issues but will do that in the future.

My application is being developed on a standalone system (i.e., no internet) so I cannot provide code snippets without having to manually type it back in. That is why I have not and cannot provide plunkr. I do try to describe the problem as thoroughly as possible because of this.

As far as this issue, I do know how to embed a standard table inside of another one. I was actually trying to find out how to embed a smart table into a smart table's row. I admit I wasn't the most clear in the description and was mistaken when I said the embedded table didn't need headers or sorting. My initial attempt at an embedded smart-table didn't work (wouldn't sort). I didn't write smart-table so if it doesn't work, why wouldn't I ask for help? I actually had to end up abandoning the embedded smart-table and do everything through straight html.

As far as #325, I never got an email with SydneySmith's comment so I never knew it was asked for. I would have added a comment with it had I known. I added a comment but it's probably too late now.

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

No branches or pull requests

2 participants