lorenzofox3 / Smart-Table

Code source of Smart Table module: a table/grid for Angularjs

Home Page:http://lorenzofox3.github.io/smart-table-website/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Evaluate Multi-/Single-Select with a scope

KabaTheBear opened this issue · comments

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".

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