Closed akarnachuk closed 5 years ago
Hi @akarnachuk . Thanks for report
Why do you put ts-primary
and ts-danger
those two together. Which is not make sense. You can put your own class
here but not an tradeshift-ui button type.
We reuse the buttonCollection check in the same logic. https://github.com/Tradeshift/tradeshift-ui/blob/master/src/runtime/js/ts.ui/bars/bars-api@tradeshift.com/models/local/bar/ts.ui.BarModel.js#L18 It might break other stuff if I change it here. I think it is easy for you stop use the wrong way . Thanks
Describe the bug Header button is shown twice when type contains
ts-danger
with one ofts-primary, ts-secondary or ts-tertiary
To reproduce ts.ui.TopBar.buttons([{label : 'Primary', type : 'ts-primary ts-danger'}]
Expected behavior Show the requested quantity of buttons.
Framework usage
Additional context http://ui.tradeshift.com/v12/#components/header/buttons.html
Also such types produce multiply buttons:
'ts-primary ts-secondary'
, 'ts-primary ts-secondary',ts-secondary ts-danger-no-matter-what-is-added-after