MCPcopy Create free account
hub / github.com/adobe/react-spectrum / removeDataAttributes

Function removeDataAttributes

packages/react-aria-components/src/utils.tsx:394–405  ·  view source on GitHub ↗
(props: T)

Source from the content-addressed store, hash-verified

392 * @param props
393 */
394export function removeDataAttributes<T>(props: T): T {
395 const prefix = /^(data-.*)$/;
396 let filteredProps = {} as T;
397
398 for (const prop in props) {
399 if (!prefix.test(prop)) {
400 filteredProps[prop] = props[prop];
401 }
402 }
403
404 return filteredProps;
405}
406
407// Override base type to change the default.
408export interface RACValidation {

Callers 13

NumberField.tsxFile · 0.90
TextField.tsxFile · 0.90
DateField.tsxFile · 0.90
RadioGroup.tsxFile · 0.90
DatePicker.tsxFile · 0.90
AutocompleteFunction · 0.90
ComboBoxInnerFunction · 0.90
SelectInnerFunction · 0.90
SearchField.tsxFile · 0.90
Switch.tsxFile · 0.90
useCheckboxAriaFunction · 0.90
ColorChannelFieldFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected