Completed
Last Updated: 22 Jan 2024 09:34 by ADMIN
Release 5.1.0 (31 Jan 2024) (R1 2024)
Created by: Raventhorn
Comments: 13
Category: Dialog
Type: Feature Request
49
Would be great to have the ability to customize the text of the Dialog Factory buttons, especially for Confirmation. We could use a Custom window but all we need to do is change the buttons and the Dialogs feature is perfect.
Completed
Last Updated: 03 Aug 2023 12:18 by Anthony Gianino
Release 2.30.0

 <AdminEdit>

This feature request would be used to monitor the requests for a full-fledged Dialog component. It will be defined in the Markup and will provide options to customize the Header and Content and will expose Action buttons.

</AdminEdit>

Completed
Last Updated: 22 Jun 2023 11:17 by ADMIN
Release 4.4.0 (07/19/2023) (R3 PI1)
Created by: Aleksandr
Comments: 0
Category: Dialog
Type: Feature Request
13

I want to fill the textbox of the prompt with predefined text, can we have that same behavior like in kendo https://docs.telerik.com/kendo-ui/api/javascript/kendo/methods/prompt?

 

---------

ADMIN EDIT

Here is a workaround

 

@inject IJSRuntime _js

<TelerikButton OnClick="@PromptWithText">Workaround</TelerikButton>

@code{
    [CascadingParameter]
    public DialogFactory Dialogs { get; set; }

    async Task PromptWithText()
    {
        // the workaround - invoke a script that will set the input value with a delay
        await _js.InvokeVoidAsync("setPromptDefaultText", "predefined prompt value");

        // do the prompts as usual
        string prompt = await Dialogs.PromptAsync("Enter something");
        Console.WriteLine(prompt);
    }
}

@* move this script to a proper location, this is a hack 
    to put in the blazor component so the workaround is easy to copy and run *@
<script suppress-error="BL9992">
    function setPromptDefaultText(defText) {
        setTimeout(function(){
            var promptInput = document.querySelector(".k-prompt-container .k-textbox .k-input-inner");
            if(promptInput) {
                promptInput.value = defText;
                promptInput.dispatchEvent(new Event('input', {bubbles: true} ));
            }
        }, 50); // a timeout so the prompt can render first
    }
</script>

 

---------

Completed
Last Updated: 18 May 2021 06:07 by ADMIN
It I possible to customize the Dialog component (e.g Yes/No instead of OK/Cancel)?