children Questions

5

Solved

How do I get the text of an element without the children? Neither element.textContent nor element.innerText seem to be working. HTML: <body> <h1>Test Heading</h1> <div> Aw...
Hypercorrection asked 31/3, 2012 at 12:43

8

Solved

Here is the issue that I'm encountering with Angular 7 : I have two outlets : the main app router outlet, and a secondary outlet named 'administration'. When I want to navigate through any admini...
Cutinize asked 10/4, 2019 at 16:55

4

Solved

How do you emit event inside recursive child components vuejs Taking the tree example from vue site https://v2.vuejs.org/v2/examples/tree-view.html How would you transmit on click to the parent eac...
Psychodynamics asked 14/9, 2017 at 13:16

3

Quick question for react gurus ;) React.Children.only is one of its top-level apis, and is very commonly used by react-redux (<Provider />) and React Router (<Router />) to inject stor...
Scorekeeper asked 17/2, 2018 at 4:18

11

Solved

I'm trying to loop through childNodes like this: var children = element.childNodes; children.forEach(function(item){ console.log(item); }); However, it output Uncaught TypeError: undefined is n...
Rumelia asked 16/7, 2014 at 8:23

11

Solved

I have the following: for (var i = 0; i < children.length; i++){ if(hasClass(children[i], "lbExclude")){ children[i].parentNode.removeChild(children[i]); } }; I would like it to loop throu...
Etna asked 26/4, 2010 at 8:53

4

Process A fork()s process B. Process A dies and therefore init adopts B. A watchdog creates process C. Is it somehow possible for C to adopt B from init? Update: Or would it even be possible...
Dextral asked 9/5, 2012 at 16:5

5

I'm working with jstree with ajax and I see that all my nodes have the arrow to expand it, even those which have no children. On the demo page of jstree http://www.jstree.com/demo this is not the c...
Worcestershire asked 21/9, 2011 at 12:33

1

Solved

I have an app that pulls data from a GraphQL database and then .maps it into custom form components (quantity number textboxes). Right now, the components themselves are holding state of their indi...
Hateful asked 26/8, 2022 at 5:45

3

I am having some strange behaviour where this.props.children is converting to an object when I spread the result of a .map() from the parent. example: const items = [ { id: 1, name: "Name1" }, ...
Bobbyebobbysocks asked 22/3, 2018 at 6:23

4

I have a component like this const Component = () => { return ( <div> <div className="data1"> {children} </div> <div className="data1"> {child...
Voiceless asked 27/7, 2020 at 13:14

6

Solved

How do I select the first div in these divs (the one with id=div1) using first child selectors? <div class="alldivs"> <div class="onediv" id="div1"> 1 Thi...
Pelops asked 2/5, 2011 at 0:31

4

Solved

I'm trying to properly type the props for a component that maps children: type Props = { children: any } const MyComponent: FunctionComponent<Props> = () => (React.Children.map(children...
Insidious asked 15/4, 2020 at 18:58

9

Solved

I don't know if there is an issue, but I was wondering why the overflow:hidden does not function on fixed parent/children element. Here's an example: CSS and HTML: .parent{ position:fixed;...
Barto asked 17/9, 2012 at 16:40

7

Solved

I retrieve an XML documents this way: import xml.etree.ElementTree as ET root = ET.parse(urllib2.urlopen(url)) for child in root.findall("item"): a1 = child[0].text # ok a2 = child[1].text # ok...
Munificent asked 20/9, 2014 at 16:1

2

Solved

I have a component that should accept arbitrary amount of child components of known type and render them with additional wrapper in an *ngFor. Alternatively, can I pass and render a list of <ng-...
Ingratitude asked 9/3, 2022 at 15:13

3

Solved

If I have this structure: const MyComponent = (props) => { return ( <Wrapper />{props.children}</Wrapper> ); } and I use it like this: <MyComponent> <SomeInnerCompon...
Schexnayder asked 20/7, 2017 at 8:46

1

So we are doing a Virtual Pet project and we need to make ArrayLists and interact with the virtual pets. What I want to do is have a PetClass superclass that extends to CatClass and DogClass. CatCl...
Steamtight asked 4/2, 2022 at 1:16

4

Solved

Suppose you have a nested element structure, for example a ContextMenu with MenuItems: <ContextMenu Style="{StaticResource FooMenuStyle}"> <MenuItem Style="{StaticResource FooMenuItemSty...
Gold asked 20/3, 2009 at 14:3

1

Solved

I have successfully installed eslint-plugin-testing-library and used overrides so it only warns me on code in test files. However, it complains Avoid direct Node access. Prefer using the methods fr...
Betweentimes asked 14/4, 2021 at 22:22

3

Solved

I am able to add and remove the classes on the child elements but all are active. I am trying to add & remove only on one active element at a time. What am I missing? <ul id="parent" class=...
Socialize asked 29/10, 2017 at 5:45

7

I'm stuck on figuring out the logic to make a drop down menu keyboard accessible. The HTML is structured as such (extra class names used for clarity): <ul> <li class="primaryMenuItem"&g...
Anacardiaceous asked 3/2, 2010 at 22:12

1

Take a look at this simple example: const List = function({ loading, entity }) { return ( <Layout loading={loading}> <span>Name: {entity.name}</span> </Layout> ); }; ...
Synchro asked 4/12, 2018 at 13:30

3

Solved

Let's assume we have this HTML structure: <div id='test-div'> <div class='random-class-1'> <div class='useless-element-1'> </div> <div class='useless-element-2'> ...
Singletary asked 8/2, 2017 at 23:12

5

Solved

I have a Window1.xaml main Window; and after some event, I display a UserControl EditFile.xaml. The code behind is: public static int whichSelected = -1; private void button1_Click(object sender,...
Extortioner asked 1/6, 2010 at 10:52

© 2022 - 2024 — McMap. All rights reserved.