Module talk:Clade/hidden

Accepting values for "expanded"
Currently if the parameter 'expanded' is used it is always set to true, even if 'expanded=false' is used.

Might be better to change:

local initialState = mw.getCurrentFrame:getParent.args['expanded']

to:

local initialState = mw.getCurrentFrame:getParent.args['expanded']

if mw.getCurrentFrame:getParent.args['expanded'] == "true" then
 * initialState = true

else
 * initialState = false

end

or something similar. Southernants (talk) 22:13, 21 May 2023 (UTC)


 * ✅ I wrote the code to use expanded as a flag, i.e. any value or empty parameter would set the initial stated expanded. However, the documentation didn't reflect this. It now takes true or yes to set the initial state. —  Jts1882 &#124; talk 08:11, 22 May 2023 (UTC)