diff --git a/components/widget/standings/widget_standings_ffa.lua b/components/widget/standings/widget_standings_ffa.lua index 71fb34586f4..495248fe809 100644 --- a/components/widget/standings/widget_standings_ffa.lua +++ b/components/widget/standings/widget_standings_ffa.lua @@ -35,6 +35,8 @@ function StandingsFfaWidget:render() local standings = self.props.standings local roundCount = #standings.rounds + local hasRoundSelector = roundCount > 1 + return DataTable{ wrapperClasses = {'toggle-area', 'toggle-area-' .. roundCount}, classes = {'wikitable-bordered', 'wikitable-striped'}, @@ -50,15 +52,15 @@ function StandingsFfaWidget:render() children = { HtmlWidgets.Span{ css = { - ['margin-left'] = '-70px', ['vertical-align'] = 'middle', + ['margin-left'] = hasRoundSelector and '-70px' or nil, }, children = standings.section }, - RoundSelector{ + hasRoundSelector and RoundSelector{ rounds = roundCount, hasEnded = standings.rounds[#standings.rounds].finished, - }, + } or nil, }, }}, -- Column Header diff --git a/components/widget/standings/widget_standings_round_selector.lua b/components/widget/standings/widget_standings_round_selector.lua index 91a3feabe65..2b57eedf3f1 100644 --- a/components/widget/standings/widget_standings_round_selector.lua +++ b/components/widget/standings/widget_standings_round_selector.lua @@ -45,6 +45,7 @@ function RoundSelectorWidget:render() return Button{ children = roundTitle, variant = 'primary', + size = 'sm', classes = {'toggle-area-button'}, attributes = {['data-toggle-area-btn'] = roundIndex}, } @@ -57,6 +58,7 @@ function RoundSelectorWidget:render() Button{ children = finalRoundTitle(), variant = 'primary', + size = 'sm', classes = {'dropdown-box-button'}, }, HtmlWidgets.Div{