Giter Club home page Giter Club logo

nghierarchicalselector's People

Contributors

lukemurray avatar timothyoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nghierarchicalselector's Issues

Initial input is not keyboard accessible (not focusable)

Even if tabindex="0" is added to the hierarchical-input, it doesn't seem to allow Enter to open the tree view. Once the tree view is open (via mouse click), there are keyboard actions to navigate the tree ok.

As it is, this widget is not accessible at all because you can't get to the initial state to open the tree via keyboard.

Postback issue

I'm trying to embed this to a SharePoint webpart control however the control is causing the page to refresh everytime. Is there anyway to prevent it posting back?

Regarding load asyncData with ngHierarchicalSelector

i am facing some problems with asyncData as hierarchical selector is populating with no data.

[{"id":987,"name":"AP","children":[]},{"id":978,"name":"MP","children":[]},{"id":992,"name":"UP","children":[]},{"id":997,"name":"HP","children":[]},{"id":1007,"name":"AAP","children":[]}]

I am using the same example with different data as below:
we have some services to get for cities in each and every object of above array

html:

jS:

$scope.loadAsyncData = function(parent) {
var defer = $q.defer();
if (!parent) {
$http.get("api/.....myservicecall").success(function (data) {
data = data.List;
for (var i = 0; i < data.length; i++) {
data[i].hasChildren = true;
}
defer.resolve(data);
});
}else{
$http.get("api/....myservicecall?id="+parent.id).success(function (data) {
data = data.List;
for (var i = 0; i < data.length -1; i++) {
data[i].hasChildren = true;
}
defer.resolve(data);
}).error(function (data){

                                });                             
                            }

i totally understand with assigning data="data". but i am not able to understand how it will load with async data..

Please help me out on this .. or any where i can get document regarding asyncdata loading

Evaluate how to deal with long lists without drawbacks on the user experience

@lukemurray on GlobaLeaks we are evaluating the use of NgHierarchicalSelector inside our form builder to make possible for a user to select options from a hierarchic select-box like the one implemented by NgHierarchicalSelector (globaleaks/GlobaLeaks#1408).

we would have the need to deal with long lists and i'm wondering how this would impact not only from a performance point of view but mostly from the user experience point of view;
suppose in fact that one loads a very long list and has to scroll down a lot to find the element he would like to click. have you ever dealt with such a requirement and what would be your suggestion?

set placeholder

Hello,
It would be nice to have the option to set a placeholder in the dirrective.
I don't know how to deal with it as you use templateCache.
Can you give me a hint ?
Thank you

Reset field empty

How do I reset the selection field empty?
I'd like to make the field empty after selection is complete. But until I don't refresh the page, I'm not able to remove the selected item from the selection field.

ng-model and ng-repeat syntax

I need to be able to select the values output into the selection as well as set which property should be used as "children".

Something like this would be stellar:

<hierarchical-selector
    ng-items="location.name for location in locations"
    ng-children="dependents"
    ng-model="model.location" />

It's not easy to adhere to your id, name, children structure without jumping through hoops to save the selection properly.

Validation - Required field

Hi!

I just discover this awesome directive, amazing, you save my day!

I was wondering if there is any default attribute to set this type of field as required?

Thanks in advance!

Setting selection on multi-select

When I try to set the selection on a multi-select, the only way that I can find to get the checkboxes to be correctly checked as well as the preselected items to show up in the box when the form renders is to set both the selection as well as meta information in the data. Is there a better way?

areas.controller("areaAddTypeController", ['$scope', '$state', function($scope, $state) {
....
    $scope.selection = [{id: 1, name: "Country"}];
    $scope.areaTypes = [{id: 1, name: "Country",_hsmeta: {selected:true}}, {id: 2, name: "Province"}, {id: 3, name: "Cluster"}];
....
}]);

tag:

<hierarchical-selector multi-select="true" data="areaTypes" on-selection-changed="updateItems(items)" selection="selection" />

issue when selection and onSelectionChanged are bound to same scope variable

I am facing an issue when i bind selection and onSelectionChanged to same scope variable. For Example,

        <hierarchical-selector id="product"
                               class="tree-browser"
                               ng-model="searchModel.products"
                               data="productHierarchy"
                               on-selection-changed="searchModel.products = items"
                               multi-select="true"
                               selection="searchModel.products"
                               no-button/>

I am using selection to display default selected values when page loads for the first time. When user manually changes the selected nodes on the tree, itemSelected is called which calls onSelectionChanged. The watch on selection is triggered as both are bound to same variable. This in turn calls itemSelected and so on. The code goes into an infinite loop and the web page freezes. Is there a solution to the problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.