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

Width doesn't work #15

Closed
joshangell opened this issue Jul 16, 2015 · 4 comments
Closed

Width doesn't work #15

joshangell opened this issue Jul 16, 2015 · 4 comments

Comments

@joshangell
Copy link
Contributor

When configuring the columns of the field there is a width option, it doesn't appear to do anything.

I took a quick look and it seems that the columns are generated using table.getFields() and the field model doesn't have the column width set on it so its not a simple solution of templating in the width value.

I'd suggest either using the column settings natively or perhaps extending the native FieldModel.

@engram-design
Copy link
Member

Hey @joshangell the width settings are actually stored in the Super Table field settings, associated with the field id. When the input gets rendered, it should fetch the ST field settings, and lookup the array for that field's id.

{"columns":{"531":{"width":"20"},"532":{"width":"50"}},"fieldLayout":"row","staticField":null,"selectionLabel":"Add more rows","maxRows":"5"}

@joshangell
Copy link
Contributor Author

If I do {{ dump(field) }} in the loop at line 13 of the tableInput template I don't see that array, is that where I should be seeing those settings?

@engram-design
Copy link
Member

Good point - the width isn't being applied to the table header, but it is on the table rows. Have a look at https://github.com/engram-design/SuperTable/blob/master/supertable/templates/fields.html#L12

@engram-design
Copy link
Member

@joshangell Fixed in the 0.3.1 release.

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