-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature to disable the Dropdown (#378)
* Add feature to disable Dropdown #373
- Loading branch information
Showing
12 changed files
with
148 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_04_A_Sizing.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_04_B_Sizing.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_07_A_Disabled.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Dropdown Disabled="@isDropdownDisabled"> | ||
<DropdownToggleButton Color="ButtonColor.Secondary">Dropstart</DropdownToggleButton> | ||
<DropdownMenu> | ||
<DropdownItem To="#" Type="ButtonType.Link">Action</DropdownItem> | ||
<DropdownItem To="#" Type="ButtonType.Link">Another action</DropdownItem> | ||
<DropdownItem To="#" Type="ButtonType.Link">Something else here</DropdownItem> | ||
</DropdownMenu> | ||
</Dropdown> | ||
|
||
<div class="mt-3"> | ||
<Button Color="ButtonColor.Primary" Size="Size.Small" @onclick="EnableDropdown">Enable</Button> | ||
<Button Color="ButtonColor.Danger" Size="Size.Small" @onclick="DisableDropdown">Disable</Button> | ||
</div> | ||
@code | ||
{ | ||
private bool isDropdownDisabled = true; | ||
private void EnableDropdown() => isDropdownDisabled = false; | ||
private void DisableDropdown() => isDropdownDisabled = true; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
@namespace BlazorBootstrap | ||
@inherits BlazorBootstrapComponentBase | ||
|
||
<CascadingValue IsFixed="true" Value="@Split" Name="Split"> | ||
<CascadingValue IsFixed="true" Value="@AutoClose" Name="AutoClose"> | ||
<CascadingValue IsFixed="true" Value="@AutoCloseBehavior" Name="AutoCloseBehavior"> | ||
<div @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes"> | ||
@ChildContent | ||
</div> | ||
<CascadingValue IsFixed="true" Value="@AutoClose" Name="AutoClose"> | ||
<CascadingValue IsFixed="true" Value="@AutoCloseBehavior" Name="AutoCloseBehavior"> | ||
<CascadingValue IsFixed="true" Value="@Disabled" Name="Disabled"> | ||
<CascadingValue IsFixed="true" Value="@Size" Name="Size"> | ||
<CascadingValue IsFixed="true" Value="@Split" Name="Split"> | ||
<div @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes"> | ||
@ChildContent | ||
</div> | ||
</CascadingValue> | ||
</CascadingValue> | ||
</CascadingValue> | ||
</CascadingValue> | ||
</CascadingValue> | ||
</CascadingValue> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
blazorbootstrap/Components/Dropdown/DropdownActionButton.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
@namespace BlazorBootstrap | ||
@inherits BlazorBootstrapComponentBase | ||
|
||
<button @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes"> | ||
<button @ref="@ElementRef" | ||
@attributes="@Attributes" | ||
class="@ClassNames" | ||
disabled="@Disabled" | ||
id="@ElementId" | ||
style="@StyleNames"> | ||
@ChildContent | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
blazorbootstrap/Components/Dropdown/DropdownToggleButton.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
@namespace BlazorBootstrap | ||
@inherits BlazorBootstrapComponentBase | ||
|
||
<button @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes"> | ||
<button @ref="@ElementRef" | ||
@attributes="@Attributes" | ||
class="@ClassNames" | ||
disabled="@Disabled" | ||
id="@ElementId" | ||
style="@StyleNames"> | ||
@ChildContent | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.