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

Customizable sort icon component #478

Closed
RedTn opened this issue Aug 21, 2017 · 5 comments
Closed

Customizable sort icon component #478

RedTn opened this issue Aug 21, 2017 · 5 comments

Comments

@RedTn
Copy link
Contributor

RedTn commented Aug 21, 2017

It would be nice if there were some properties we can pass into the content of this element here:
https://github.com/offirgolan/ember-light-table/blob/master/addon/templates/components/columns/base.hbs#L6
Materialize expects the element to be defined like this:
<i class="material-icons">add</i>
http://materializecss.com/icons.html

@RedTn RedTn closed this as completed Aug 21, 2017
@RedTn RedTn reopened this Aug 21, 2017
@RedTn
Copy link
Contributor Author

RedTn commented Aug 21, 2017

Right, but materialize also requires the content in that i tag in order to determine the icon to use.
So in my example, it requires:
<i ...>add</i>.
Ideally, we could do something like:
{{t.head ... iconSortable="material-icons" iconSortableValue="add"}}

@alexander-alvarez
Copy link
Collaborator

got it, now I understand.. I've never heard of anything like that, but I understand how it works.

In the meantime you can define your own column component that gets called here.
You can generate it with ember g column-type <your_column_type>
and set the http://offirgolan.github.io/ember-light-table/docs/classes/Column.html#property_type property on your columns passed into to light table.

I'm not sure if we would want to yet another property for icons or maybe make the icon component customizable all together.

@buschtoens any thoughts?

@buschtoens
Copy link
Collaborator

I've never heard of anything like that, but I understand how it works.

Count me in. 😄

I'm not sure if we would want to yet another property for icons or maybe make the icon component customizable all together.

I'm on the same page. We should rather add an iconComponet to the TableHeaderMixin and render it instead of the <i> tag, that was already getting a bit too complex anyways.

Absolutely in favor! 👍

@buschtoens buschtoens changed the title light-table: 'iconSortable' for materialize icons Customizable sort icon component Aug 22, 2017
@RedTn
Copy link
Contributor Author

RedTn commented Oct 26, 2017

PR Created: #489

@RedTn RedTn closed this as completed Oct 26, 2017
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

3 participants