MCPcopy Index your code
hub / github.com/adobe/react-spectrum / removeDataAttributes

Function removeDataAttributes

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

Source from the content-addressed store, hash-verified

377 * @param props
378 */
379export function removeDataAttributes<T>(props: T): T {
380 const prefix = /^(data-.*)$/;
381 let filteredProps = {} as T;
382
383 for (const prop in props) {
384 if (!prefix.test(prop)) {
385 filteredProps[prop] = props[prop];
386 }
387 }
388
389 return filteredProps;
390}
391
392// Override base type to change the default.
393export 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