Smart-Table icon indicating copy to clipboard operation
Smart-Table copied to clipboard

st-ratio can not be declared as a function

Open dmlgncn opened this issue 7 years ago • 1 comments

Hi all, I want to calculate table columns width dynamically. Because my columns count will be dynamic, not fixed count. But st-ratio can not be declared as a function? Could you please help me? And also I searched st-ratio in smart-table directive is it as function or not. I could not found anything about it.

I write my html code like below:

`<td st-ratio="getRatio()">{{row.firstName}}</td>`

and in my function I returned float after calculation. But it does not work.

dmlgncn avatar Jan 22 '18 07:01 dmlgncn

Hello @dmlgncn,

stRatio isn't in the main SmartTable. It is just an exmaple directive in the documentation and it will just add the width to the element like you can see in the documentation.

So you need to create your own stRatio directive.

MrWook avatar Jan 23 '18 11:01 MrWook