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

Evaluate Multi-/Single-Select with a scope

Open KabaTheBear opened this issue 8 years ago • 1 comments
trafficstars

I want to change the option of multi-/single-select on the fly, by pressing a button to change a scope to "multiple or "" which should be evaluated by "st-select-mode" like in:

st-select-mode="selectionmode" or st-select-mode="{{selectionmode}}".

But this doesnt work. In the documentation is mentioned for single-select : dont specifiy a select mode. I thought if angularJS evaluates a blank string it would be single.

Any Idea how i can achieve this "on the fly change".

KabaTheBear avatar Jul 22 '17 18:07 KabaTheBear

Hello @KabaTheBear,

quick look into the source code and everything will be revealed.

SPOILER: You can set it with "single" instead of "multiple". Also what i can see is that this select mode is not designed to be dynamic. Line 338: var mode = attr.stSelectMode || stConfig.select.mode; What i undestand from it is that it either hardcopied from the attribute or is selected from the config. You could create a PR for this, i guess

MrWook avatar Jul 24 '17 07:07 MrWook