Skip to content

Extend filters to allow html attributes to be passed down #1715

Open
@oakley808

Description

@oakley808

Hello.
Currently it appears there is no way to add an html attribute to the underlying markup that is generated by the built-in filters such as <SelectFilter>.

My use-case would be adding an id, data, or aria attribute to the html elements such as a <select>.

Attributes are passed to the component in the JSX.

<SelectFilter ref='selectFilter' { ...this.props.filter }

But they aren't shared with the HTML elements.

<select ref='selectInput'
style={ this.props.style }
className={ selectClass }
onChange={ this.filter }
defaultValue={ (this.props.defaultValue !== undefined) ? this.props.defaultValue : '' } >
{ this.getOptions() }
</select>

I'm happy to submit a PR if you agree with the use.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions