Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const Button = props => {
target,
type,
download,
name,
value,
...otherProps
} = props;

Expand All @@ -45,6 +47,8 @@ const Button = props => {
href={disabled ? null : href}
disabled={disabled}
download={useLink ? download : null}
name={useLink ? null : name}
value={useLink ? null : value}
{...omit(['n_clicks_timestamp'], otherProps)}
data-dash-is-loading={
(loading_state && loading_state.is_loading) || undefined
Expand Down Expand Up @@ -193,7 +197,20 @@ Button.propTypes = {
/**
* Indicates that the hyperlink is to be used for downloading a resource.
*/
download: PropTypes.string
download: PropTypes.string,

/**
* The name of the button, submitted as a pair with the button’s value as part
* of the form data.
*/
name: PropTypes.string,

/**
* Defines the value associated with the button’s name when it’s submitted
* with the form data. This value is passed to the server in params when the
* form is submitted.
*/
value: PropTypes.string
};

export default Button;