Search results

ProgressButton

The ProgressButton visualizes the progression of an operation to indicate the user that a process is happening in the background with visual representation.

<button id="element"></button>
<script>
var progressButtonObj = new ProgressButton({ content: 'Progress Button' });
progressButtonObj.appendTo("#element");
</script>

Properties

animationSettings

AnimationSettingsModel

Specifies the animation settings.

content

string

Defines the text content of the progress button element.

Defaults to ""

cssClass

string

Specifies the root CSS class of the progress button that allows customization of component’s appearance. The progress button types, styles, and size can be achieved by using this property.

Defaults to ""

disabled

boolean

Enables or disables the progress button.

Defaults to false.

duration

number

Specifies the duration of progression in the progress button.

Defaults to 2000

enableHtmlSanitizer

boolean

Specifies whether to enable the rendering of untrusted HTML values in the Progress button component. If ‘enableHtmlSanitizer’ set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.

Defaults to true

enablePersistence

boolean

Enable or disable persisting component’s state between page reloads.

Defaults to false

enableProgress

boolean

Enables or disables the background filler UI in the progress button.

Defaults to false

enableRtl

boolean

Enable or disable rendering component in right to left direction.

Defaults to false

iconCss

string

Defines class/multiple classes separated by a space for the progress button that is used to include an icon. Progress button can also include font icon and sprite image.

Defaults to ""

iconPosition

string | IconPosition

Positions an icon in the progress button. The possible values are:

  • Left: The icon will be positioned to the left of the text content.
  • Right: The icon will be positioned to the right of the text content.
  • Top: The icon will be positioned at the top of the text content.
  • Bottom: The icon will be positioned at the bottom of the text content.

Defaults to Syncfusion.EJ2.Buttons.IconPosition.Left

isPrimary

boolean

Allows the appearance of the progress button to be enhanced and visually appealing when set to true.

Defaults to false

isToggle

boolean

Makes the progress button toggle, when set to true. When you click it, the state changes from normal to active.

Defaults to false

spinSettings

SpinSettingsModel

Specifies a spinner and its related properties.

Methods

addEventListener

Adds the handler to the given event listener.

Parameter Type Description
eventName string A String that specifies the name of the event
handler Function Specifies the call to run when the event occurs.

Returns void

appendTo

Appends the control within the given HTML element

Parameter Type Description
selector (optional) string | HTMLElement Target element where control needs to be appended

Returns void

attachUnloadEvent

Adding unload event to persist data when enable persistence true

Returns void

click

Click the button element its native method

Returns void

dataBind

When invoked, applies the pending property changes immediately to the component.

Returns void

destroy

Destroys the widget.

Returns void

detachUnloadEvent

Removing unload event to persist data when enable persistence true

Returns void

focusIn

Sets the focus to ProgressButton its native method

Returns void

getLocalData

Returns the persistence data for component

Returns any

getRootElement

Returns the route element of the component

Returns HTMLElement

handleUnload

Handling unload event to persist data when enable persistence true

Returns void

progressComplete

Complete the button progress.

Returns void

refresh

Applies all the pending property changes and render the component again.

Returns void

removeEventListener

Removes the handler from the given event listener.

Parameter Type Description
eventName string A String that specifies the name of the event to remove
handler Function Specifies the function to remove

Returns void

start

Starts the button progress at the specified percent.

Parameter Type Description
percent (optional) number Starts the button progress at this percent.

Returns void

stop

Stops the button progress.

Returns void

Events

begin

EmitType<ProgressEventArgs>

Triggers when the progress starts.

created

EmitType<Event>

Triggers once the component rendering is completed.

end

EmitType<ProgressEventArgs>

Triggers when the progress is completed.

fail

EmitType<Event>

Triggers when the progress is incomplete.

progress

EmitType<ProgressEventArgs>

Triggers in specified intervals.